Creates a new filter description with the given name and class

@param name        The filter name
@param filterClass The filter class
@return A new filter description
771068
public static FilterInfo filter(final String name, final Class<? extends Filter> filterClass) {
        return new FilterInfo(name, filterClass);
    }
926835
def addFilter(self, filterclass):
        """"""
        if filterclass not in self.filters:
            self.filters.append(filterclass)
437966
public static Filter<Zone> nameEqualTo(final String name) {
    checkNotNull(name, "name");
    return new Filter<Zone>() {

      @Override
      public boolean apply(Zone in) {
        return in != null && name.equals(in.name());
      }

      @Override
      public String toString() {
        return "nameEqualTo(" + name + ")";
      }
    };
  }
408203
public static filterpolicy[] get(nitro_service service, String name[]) throws Exception{
		if (name !=null && name.length>0) {
			filterpolicy response[] = new filterpolicy[name.length];
			filterpolicy obj[] = new filterpolicy[name.length];
			for (int i=0;i<name.length;i++) {
				obj[i] = new filterpolicy();
				obj[i].set_name(name[i]);
				response[i] = (filterpolicy) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
1176387
private static Filter createFilter(final BundleContext bundleContext, final Class<?> trackedClass) {
		final String filter = "(" + Constants.OBJECTCLASS + "=" + trackedClass.getName() + ")";
		try {
			return bundleContext.createFilter(filter);
		} catch (InvalidSyntaxException e) {
			throw new IllegalArgumentException("Unexpected InvalidSyntaxException: " + e.getMessage());
		}
	}
706296
public void addResponseFilter(String name, ResponseFilter responseFilter) {
    if (responseFilters.containsKey(name)) {
      throw new IllegalArgumentException("Duplicate response filter: " + name);
    }
    proxy.addResponseFilter(responseFilter);
    responseFilters.put(name, responseFilter);
  }
291816
public final <T> void addOption(Class<T> cls, String name, String description)
    {
        addOption(cls, name, description, null);
    }
1248978
private void add(ClassFilter filter) {
        switch(operator) {
        case NOT:
            filters.add(new NegationClassFilter(filter));
            operator = Operator.NONE;
            break;
        case OR:
            filters.set(filters.size() - 1, 
                        new OrClassFilter(filters.get(filters.size() - 1), filter));
            operator = Operator.NONE;
            break;
        default:
            filters.add(filter);
            break;
        }
    }
481111
public static RequestReporter initRequestReporter(FilterConfig filterConfig) {
		String className = filterConfig.getInitParameter(SimonServletFilter.INIT_PARAM_REQUEST_REPORTER_CLASS);

		if (className == null) {
			return new DefaultRequestReporter();
		} else {
			try {
				return (RequestReporter) Class.forName(className).newInstance();
			} catch (ClassNotFoundException | IllegalAccessException | InstantiationException classNotFoundException) {
				throw new IllegalArgumentException("Invalid Request reporter class name", classNotFoundException);
			}
		}
	}
144344
public static Class getClass(String name) throws ClassNotFoundException
    {
        try
        {
            return Class.forName(name);
        }
        catch (ClassNotFoundException ex)
        {
            throw new ClassNotFoundException(name);
        }
    }
1225025
public static <T> Column<T> Column(final Class<T> columnClass,
                                       final String name) {
        
        return new Column<T>(columnClass, name);
    }
905904
def get_filter_by_name(filtername, **options):
    
    cls = find_filter_class(filtername)
    if cls:
        return cls(**options)
    else:
        raise ClassNotFound('filter %r not found' % filtername)
473337
def create_dn_wcard_filter(filter_class, filter_value):
    
    wcard_filter = WcardFilter()
    wcard_filter.Class = filter_class
    wcard_filter.Property = "dn"
    wcard_filter.Value = filter_value
    return wcard_filter
27672
protected final FilterDescriptor<?, ?> getFilterBeanDescriptorForClassUnbounded(final Class<?> filterClass) {
        for (final FilterDescriptor<?, ?> descriptor : getFilterDescriptors()) {
            if (filterClass == descriptor.getComponentClass()) {
                return descriptor;
            }
        }
        return notFoundFilter(filterClass);
    }
395019
function getFilter(name) {
    if (name in this._filters) {
      return this._filters[name];
    }
    else if (this._parent) {
      return this._parent.getFilter(name);
    }

    throw new Error("Missing filter " + name);
  }
774189
@PluginFactory
    @SuppressWarnings("checkstyle:parameternumber")
    public static SentryAppender createAppender(@PluginAttribute("name") final String name,
                                                @PluginElement("filter") final Filter filter) {

        if (name == null) {
            LOGGER.error("No name provided for SentryAppender");
            return null;
        }
        return new SentryAppender(name, filter);
    }
290529
@XmlElementDecl(namespace = "", name = "filter")
    public JAXBElement<Filter> createFilter(Filter value) {
        return new JAXBElement<Filter>(_Filter_QNAME, Filter.class, null, value);
    }