@return a ClassFilter chain to use when discovering Handler classes in the classpath

@param filterToDecorate this filter will be decorated with extra rules to check package names
@param userSpecifiedPrefixes any handler package prefixes specified by user
346485
public ClassFilter decorateWithPackageNameFilters(ClassFilter filterToDecorate, List<String> userSpecifiedPrefixes) {
        DenyAllPackageNames denyAllPackageNames = new DenyAllPackageNames(filterToDecorate);

        //if user has specified package prefixes, restrict to those
        ClassFilter packagePrefixFilter = new AcceptNamedPackagePrefixes(denyAllPackageNames, userSpecifiedPrefixes);

         //always permit built in handlers, deny other chorus packages
        return new AlwaysAllowBuiltInPackageRule(packagePrefixFilter);
    }
1270370
public Iterator<InternalFactHandle> iterateFactHandles(org.kie.api.runtime.ObjectFilter filter) {
        return getObjectStore().iterateFactHandles(filter);
    }
113505
private OASFilter getFilter() {
        ClassLoader cl = getContextClassLoader();
        if (cl == null) {
            cl = OpenApiServletContextListener.class.getClassLoader();
        }
        return OpenApiProcessor.getFilter(config, cl);
    }
1150041
@SuppressWarnings("unchecked")
    public static <T> Constructor<T> findMatchingConstructor(Class<T> classToInspect, Object... params) {
        Constructor<T> checkedConstructors = null;
        for (Constructor<?> constructor : classToInspect.getDeclaredConstructors()) {
            Type[] parameterTypes = constructor.getParameterTypes();
            if (parameterTypes.length == params.length && checkParameterTypes(parameterTypes, params)) {
                if (checkedConstructors == null) {
                    checkedConstructors = (Constructor<T>) constructor;
                } else {
                    throw BusinessException.createNew(BusinessErrorCode.AMBIGUOUS_CONSTRUCTOR_FOUND)
                            .put("constructor1", constructor)
                            .put("constructor2", checkedConstructors)
                            .put("object", classToInspect.getSimpleName())
                            .put("parameters", params);
                }
            }
        }
        return checkedConstructors;
    }
901265
function getUserQueryFilter(username) {
  log.trace('getUserQueryFilter(%s)', username);
  var self = this;

  if (! username) return('(objectCategory=User)');
  if (isDistinguishedName.call(self, username)) {
    return('(&(objectCategory=User)(distinguishedName='+parseDistinguishedName(username)+'))');
  }

  return('(&(objectCategory=User)(|(sAMAccountName='+username+')(userPrincipalName='+username+')))');
}
678676
public PredicatesHandler addPredicatedHandler(final Predicate predicate, final HandlerWrapper handlerWrapper, final HandlerWrapper elseBranch) {
        Holder[] old = handlers;
        Holder[] handlers = new Holder[old.length + 1];
        System.arraycopy(old, 0, handlers, 0, old.length);
        HttpHandler elseHandler = elseBranch != null ? elseBranch.wrap(this) : null;
        handlers[old.length] = new Holder(predicate, handlerWrapper.wrap(this), elseHandler);
        this.handlers = handlers;
        return this;
    }
489165
private JdepsFilter dependencyFilter(JdepsConfiguration config) {
        // Filter specified by -filter, -package, -regex, and --require options
        JdepsFilter.Builder builder = new JdepsFilter.Builder();

        // source filters
        builder.includePattern(options.includePattern);

        // target filters
        builder.filter(options.filterSamePackage, options.filterSameArchive);
        builder.findJDKInternals(options.findJDKInternals);

        // --require
        if (!options.requires.isEmpty()) {
            options.requires.stream()
                .forEach(mn -> {
                    Module m = config.findModule(mn).get();
                    builder.requires(mn, m.packages());
                });
        }
        // -regex
        if (options.regex != null)
            builder.regex(options.regex);
        // -package
        if (!options.packageNames.isEmpty())
            builder.packages(options.packageNames);
        // -filter
        if (options.filterRegex != null)
            builder.filter(options.filterRegex);

        return builder.build();
    }
684121
public ComparisonExpression getGteFilterFromPrefixLike() {
        ExpressionType rangeComparator = ExpressionType.COMPARE_GREATERTHANOREQUALTO;
        String comparand = extractLikePatternPrefix();
        return rangeFilterFromPrefixLike(m_left, rangeComparator, comparand);
    }
1118439
private String computeFilteredPrefixedValue(String type, String value,
      String filter, String prefix) throws MtasConfigException {
    String localValue = value;
    // do magic with filter
    if (filter != null) {
      String[] filters = filter.split(",");
      for (String item : filters) {
        if (item.trim().equals(MAPPING_FILTER_UPPERCASE)) {
          localValue = localValue == null ? null : localValue.toUpperCase();
        } else if (item.trim().equals(MAPPING_FILTER_LOWERCASE)) {
          localValue = localValue == null ? null : localValue.toLowerCase();
        } else if (item.trim().equals(MAPPING_FILTER_ASCII)) {
          if (localValue != null) {
            char[] old = localValue.toCharArray();
            char[] ascii = new char[4 * old.length];
            ASCIIFoldingFilter.foldToASCII(old, 0, ascii, 0,
                localValue.length());
            localValue = new String(ascii);
          }
        } else if (item.trim()
            .matches(Pattern.quote(MAPPING_FILTER_SPLIT) + "\\([0-9\\-]+\\)")) {
          if (!type.equals(MtasParserMapping.PARSER_TYPE_TEXT_SPLIT)) {
            throw new MtasConfigException(
                "split filter not allowed for " + type);
          }
        } else {
          throw new MtasConfigException(
              "unknown filter " + item + " for value " + localValue);
        }
      }
    }
    if (localValue != null && prefix != null) {
      localValue = prefix + localValue;
    }
    return localValue;
  }
1241996
public RelationGraph filterByVertex(@NonNull Predicate<? super Annotation> vertexPredicate) {
      RelationGraph gPrime = new RelationGraph();
      vertices().stream().filter(vertexPredicate).forEach(gPrime::addVertex);
      edges().stream()
             .filter(e -> gPrime.containsVertex(e.getFirstVertex()) && gPrime.containsVertex(e.getSecondVertex()))
             .forEach(gPrime::addEdge);
      return gPrime;
   }
526916
public static void configureDefaultHandler (int maxRepeat)
    {
        Logger logger = LogManager.getLogManager().getLogger("");
        Handler[] handlers = logger.getHandlers();
        RepeatRecordFilter filter = new RepeatRecordFilter(maxRepeat);
        for (int ii = 0; ii < handlers.length; ii++) {
            handlers[ii].setFilter(filter);
        }
    }
143152
public Filters.Filter buildFilter(Scan scan, ReadHooks hooks) {
    ChainFilter chain = FILTERS.chain();
    Optional<Filters.Filter> familyFilter = createColumnFamilyFilter(scan);
    if (familyFilter.isPresent()) {
      chain.filter(familyFilter.get());
    }

    if (scan.getTimeRange() != null && !scan.getTimeRange().isAllTime()) {
      chain.filter(createTimeRangeFilter(scan.getTimeRange()));
    }

    if (scan.getMaxVersions() != Integer.MAX_VALUE) {
      chain.filter(createColumnLimitFilter(scan.getMaxVersions()));
    }

    Optional<Filters.Filter> userFilter = createUserFilter(scan, hooks);
    if (userFilter.isPresent()) {
      chain.filter(userFilter.get());
    }

    return chain;
  }
1139880
function filterfrom(filter, o) {
		var t = filter(o);
		if (gui.Type.isConstructor(t)) {
			t = constructas(t, o);
		} else if (edb.Type.is(t) || t === null) {
			t = t;
		} else {
			fail(
				'edb.Type constructor or instance',
				gui.Type.of(t),
				'return null for nothing'
			);
		}
		return t;
	}
980451
public static sslcertkey_sslocspresponder_binding[] get_filtered(nitro_service service, String certkey, String filter) throws Exception{
		sslcertkey_sslocspresponder_binding obj = new sslcertkey_sslocspresponder_binding();
		obj.set_certkey(certkey);
		options option = new options();
		option.set_filter(filter);
		sslcertkey_sslocspresponder_binding[] response = (sslcertkey_sslocspresponder_binding[]) obj.getfiltered(service, option);
		return response;
	}
1191396
def iter_filters_in(target):
    # type: (Any) -> Generator[Tuple[Text, Type[BaseFilter]]]
    
    global legacy_warned
    if not legacy_warned:
        # Set the global flag to ``True`` first, in case the user has
        # ``simplefilter('error')`` set.
        legacy_warned = True

        warn(
            'Legacy extension loader is deprecated and will be removed in '
                'Filters v1.4.  '
                'See http://filters.readthedocs.io/en/latest/extensions.html#legacy-extensions-loader '
                'for more information.',

            DeprecationWarning,
        )

    ift_result = is_filter_type(target)

    if ift_result is True:
        logger.debug(
            'Registering extension filter '
            '{cls.__module__}.{cls.__name__}.'.format(
                cls = target,
            ),
        )

        yield target.__name__, target
    elif is_module(target):
        for member_name, member in get_members(target):
            member_ift_result = is_filter_type(member)

            if member_ift_result is True:
                logger.debug(
                    'Registering extension filter '
                    '{cls.__module__}.{cls.__name__}.'.format(
                        cls = member,
                    ),
                )

                yield member.__name__, member
            else:
                logger.debug(
                    'Ignoring {module}.{name} ({reason})'.format(
                        module  = target.__name__,
                        name    = member_name,
                        reason  = member_ift_result,
                    ),
                )
    elif is_class(target):
        logger.debug(
            'Ignoring {cls.__module__}.{cls.__name__} ({reason}).'.format(
                cls     = target,
                reason  = ift_result,
            ),
        )
    else:
        logger.debug(
            'Ignoring {target!r} ({reason}).'.format(
                reason  = ift_result,
                target  = target,
            ),
        )
1337345
public static systemuser[] get_filtered(nitro_service service, String filter) throws Exception{
		systemuser obj = new systemuser();
		options option = new options();
		option.set_filter(filter);
		systemuser[] response = (systemuser[]) obj.getfiltered(service, option);
		return response;
	}
671743
@GET
  @Path("/db/{authenticatorName}/cachedSerializedUserMap")
  @Produces(SmileMediaTypes.APPLICATION_JACKSON_SMILE)
  @Consumes(MediaType.APPLICATION_JSON)
  @ResourceFilters(BasicSecurityResourceFilter.class)
  public Response getCachedSerializedUserMap(
      @Context HttpServletRequest req,
      @PathParam("authenticatorName") final String authenticatorName
  )
  {
    return handler.getCachedSerializedUserMap(authenticatorName);
  }