<p>createOsgiFilter.</p>

@return a {@link org.osgi.framework.Filter} object.
@throws java.lang.IllegalArgumentException if any.
357339
public org.osgi.framework.Filter createOsgiFilter()
        throws IllegalArgumentException {
        org.osgi.framework.Filter filter;
        try {
            String filterString = String.format("(&(%s=%s)(%s=%s))", APPLICATION_NAME, applicationName,
                OBJECTCLASS, FilterFactory.class.getName());
            LOGGER.debug("createOsgiFilter={} for application {}", filterString, applicationName);
            filter = bundleContext.createFilter(filterString);
        } catch (InvalidSyntaxException e) {
            throw new IllegalArgumentException("applicationName can not contain '*', '(' or ')' : " + applicationName,
                e);
        }
        return filter;
    }
87868
public static gslbldnsentries[] get_filtered(nitro_service service, String filter) throws Exception{
		gslbldnsentries obj = new gslbldnsentries();
		options option = new options();
		option.set_filter(filter);
		gslbldnsentries[] response = (gslbldnsentries[]) obj.getfiltered(service, option);
		return response;
	}
937684
public static Filter getFilterForLocation(Class<?> clazz, String location, String context)
        throws IllegalArgumentException {
        String filter = makeLocationFilterString(location, context);
        return FilterUtils.makeFilter(clazz, filter);
    }
113505
private OASFilter getFilter() {
        ClassLoader cl = getContextClassLoader();
        if (cl == null) {
            cl = OpenApiServletContextListener.class.getClassLoader();
        }
        return OpenApiProcessor.getFilter(config, cl);
    }
592246
@SuppressWarnings("unchecked")
  public <T extends RequestFilter> T requestFilter(String name) {
    return (T) requestFilters.get(name);
  }
883560
private static Filter createFilter(final BundleContext bundleContext, final Class<?>... classes) {
		final StringBuilder filter = new StringBuilder();
		if (classes != null) {
			if (classes.length > 1) {
				filter.append("(|");
			}
			for (Class<?> clazz : classes) {
				filter.append("(").append(Constants.OBJECTCLASS).append("=").append(clazz.getName()).append(")");
			}
			if (classes.length > 1) {
				filter.append(")");
			}
		}
		try {
			return bundleContext.createFilter(filter.toString());
		} catch (InvalidSyntaxException e) {
			throw new IllegalArgumentException("Unexpected InvalidSyntaxException: " + e.getMessage());
		}
	}
287821
static FilterImpl create(final String path, String acceptType, final Filter filter) {
        if (acceptType == null) {
            acceptType = DEFAULT_ACCEPT_TYPE;
        }
        return new FilterImpl(path, acceptType, filter) {
            @Override
            public void handle(Request request, Response response) throws Exception {
                filter.handle(request, response);
            }
        };
    }
617781
public final SC registerFilter(Class<? extends Filter> filterClass) {
        WebFilter webFilter = filterClass.getAnnotation(WebFilter.class);

        if (webFilter == null)
            throw new IllegalArgumentException(String.format("Missing annotation '%s' for class '%s'", WebFilter.class.getName(), filterClass.getName()));

        String[] urlPatterns = webFilter.value();

        if (urlPatterns.length == 0)
            urlPatterns = webFilter.urlPatterns();

        if (urlPatterns.length == 0)
            throw new IllegalArgumentException(String.format("Missing pattern mapping for '%s'", filterClass.getName()));

        for (String urlPattern : urlPatterns) {
            registerFilter(filterClass, urlPattern);
        }

        return (SC) this;
    }
1306775
static FilterImpl create(final String path, final Filter filter) {
        return create(path, DEFAULT_ACCEPT_TYPE, filter);
    }
121652
@SuppressWarnings("unchecked")
    static <S extends Storable> Factory<S> getFactory(Filter<S> filter) {
        if (filter == null) {
            throw new IllegalArgumentException();
        }
        synchronized (cCache) {
            Factory<S> factory = (Factory<S>) cCache.get(filter);
            if (factory != null) {
                return factory;
            }
            Class<Cursor<S>> clazz = generateClass(filter);
            factory = QuickConstructorGenerator.getInstance(clazz, Factory.class);
            cCache.put(filter, factory);
            return factory;
        }
    }
639733
public FilterMappingType<PortletDescriptor> getOrCreateFilterMapping()
   {
      List<Node> nodeList = model.get("filter-mapping");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterMappingTypeImpl<PortletDescriptor>(this, "filter-mapping", model, nodeList.get(0));
      }
      return createFilterMapping();
   }
635735
private Filter getFilter(String layerFilter, String[] featureIds) throws GeomajasException {
		Filter filter = null;
		if (null != layerFilter) {
			filter = filterService.parseFilter(layerFilter);
		}
		if (null != featureIds) {
			Filter fidFilter = filterService.createFidFilter(featureIds);
			if (null == filter) {
				filter = fidFilter;
			} else {
				filter = filterService.createAndFilter(filter, fidFilter);
			}
		}
		return filter;
	}
718610
public static<T> Filter<T> not(final Filter<T> filter) {
		return new AbstractFilter<T>() {
			@Override
			public boolean apply(final T x) {
				return ! filter.apply(x);
			}

			@Override
			public String toString() {
				return "(not " + filter + ")";
			}

			@Override
			public Filter<T> copy() {
				return not(filter.copy());
			}
		};
	}
302519
public synchronized JarFile getFilteredJarFile(JarEntryFilter... filters)
            throws IOException {
        return new JarFile(this.rootFile, this.pathFromRoot, this.data, this.entries,
                filters);
    }
804753
@Bean
    FilterRegistrationBean eTagFilter() {

        final FilterRegistrationBean filterRegBean = new FilterRegistrationBean();
        // Exclude the URLs for downloading artifacts, so no eTag is generated
        // in the ShallowEtagHeaderFilter, just using the SH1 hash of the
        // artifact itself as 'ETag', because otherwise the file will be copied
        // in memory!
        filterRegBean.setFilter(new ExcludePathAwareShallowETagFilter("/UI/**",
                "/rest/v1/softwaremodules/{smId}/artifacts/{artId}/download",
                "/{tenant}/controller/v1/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/**",
                "/api/v1/downloadserver/**"));

        return filterRegBean;
    }
645419
public static MessageFilter compile(String filter) throws InvalidFilterException {
        MessageFilterParser parser = MessageFilterParser.createParser(filter);
        MessageFilterTranslatable t = parseToTranslatable(parser);
        MessageFilter translate = t.translate();
        if (BaseMessageFilter.class.isAssignableFrom(translate.getClass())) {
            ((BaseMessageFilter) translate).setOriginalDslString(filter);
        }

        return translate;
    }
289829
public Filter createFilter(FilterFactoryParams params) throws FilterNotCreatedException {
        try {
            return createFilter(parseCategories(params.getArgs()));
        } catch (ClassNotFoundException e) {
            throw new FilterNotCreatedException(e);
        }
    }