本文整理汇总了Java中com.sun.tools.classfile.Dependency.Filter类的典型用法代码示例。如果您正苦于以下问题:Java Filter类的具体用法?Java Filter怎么用?Java Filter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Filter类属于com.sun.tools.classfile.Dependency包,在下文中一共展示了Filter类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Get the default filter used to determine included when searching
* the transitive closure of all the dependencies.
* Unless overridden, the default filter accepts all dependencies.
* @return the default filter.
*/
public static Filter getDefaultFilter() {
return DefaultFilter.instance();
}
示例2: getRegexFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Get a filter which uses a regular expression on the target's class name
* to determine if a dependency is of interest.
* @param pattern the pattern used to match the target's class name
* @return a filter for matching the target class name with a regular expression
*/
public static Filter getRegexFilter(Pattern pattern) {
return new TargetRegexFilter(pattern);
}
示例3: getPackageFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Get a filter which checks the package of a target's class name
* to determine if a dependency is of interest. The filter checks if the
* package of the target's class matches any of a set of given package
* names. The match may optionally match subpackages of the given names as well.
* @param packageNames the package names used to match the target's class name
* @param matchSubpackages whether or not to match subpackages as well
* @return a filter for checking the target package name against a list of package names
*/
public static Filter getPackageFilter(Set<String> packageNames, boolean matchSubpackages) {
return new TargetPackageFilter(packageNames, matchSubpackages);
}
示例4: getFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Get the filter used to determine the dependencies included when searching
* the transitive closure of all the dependencies.
* Unless overridden, the default filter accepts all dependencies.
* @return the filter
*/
public Filter getFilter() {
if (filter == null)
filter = getDefaultFilter();
return filter;
}
示例5: setFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Set the filter used to determine the dependencies included when searching
* the transitive closure of all the dependencies.
* @param f the filter
*/
public void setFilter(Filter f) {
f.getClass(); // null check
filter = f;
}
示例6: setFilter
import com.sun.tools.classfile.Dependency.Filter; //导入依赖的package包/类
/**
* Set the filter used to determine the dependencies included when searching
* the transitive closure of all the dependencies.
* @param f the filter
*/
public void setFilter(Filter f) {
filter = Objects.requireNonNull(f);
}