示例#1
0
  public Collection<Filter> getAllFilters() {
    List<Filter> filters = new ArrayList<>(filterLibrary.entries());

    if (parent != null) {
      filters.addAll(parent.getAllFilters());
    }

    return filters;
  }
示例#2
0
 public Filter getFilter(String name) {
   Filter f = filterLibrary.getFilter(name);
   if (f != null) {
     return f;
   }
   if (parent != null) {
     return parent.getFilter(name);
   }
   return null;
 }
示例#3
0
 @SafeVarargs
 @SuppressWarnings("unchecked")
 public final void registerClasses(Class<? extends Importable>... classes) {
   for (Class<? extends Importable> c : classes) {
     if (ExpTest.class.isAssignableFrom(c)) {
       expTestLibrary.registerClasses((Class<? extends ExpTest>) c);
     } else if (Filter.class.isAssignableFrom(c)) {
       filterLibrary.registerClasses((Class<? extends Filter>) c);
     } else if (Tag.class.isAssignableFrom(c)) {
       tagLibrary.registerClasses((Class<? extends Tag>) c);
     }
   }
 }
示例#4
0
 public void registerFilter(Filter f) {
   filterLibrary.addFilter(f);
 }