public class RegexClassFilter extends Object implements ClassPathFilter, Serializable, StringFilterType
ClassPathFilter.UtilABSTRACT_CLASS, ANNOTATION_CLASS, FALSE, INTERFACE_CLASS, TRUE| Constructor and Description |
|---|
RegexClassFilter(Case caseSensitivity,
String pattern)
Construct a new regular expression filter with the specified flags case
sensitivity.
|
RegexClassFilter(Pattern pattern)
Construct a new regular expression filter for a compiled regular
expression
|
RegexClassFilter(String pattern)
Construct a new regular expression filter.
|
RegexClassFilter(String pattern,
int flags)
Construct a new regular expression filter with the specified flags.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Class<?> clazz)
Converts class to name and calls accept( className )
|
boolean |
accept(String className)
Checks to see if the class name matches the regular expression.
|
boolean |
accept(URL url)
Checks to see if the URL name matches the regular expression.
|
String[] |
args()
Get the arguments for the function.
|
boolean |
equals(Object o) |
Collection<Class<?>> |
filterClasses(Collection<Class<?>> collection)
Filter the collection.
|
Collection<String> |
filterNames(Collection<String> collection)
Filter the collection.
|
Collection<URL> |
filterURLs(Collection<URL> collection)
Filter the collection.
|
String |
funcName()
Function name for the filter.
|
int |
hashCode() |
ClassPathFilter |
optimize() |
String |
toString() |
public RegexClassFilter(String pattern)
pattern - regular string expression to matchIllegalArgumentException - if the pattern is nullpublic RegexClassFilter(Case caseSensitivity, String pattern)
pattern - regular string expression to matchcaseSensitivity - how to handle case sensitivity, null means case-sensitiveIllegalArgumentException - if the pattern is nullpublic RegexClassFilter(String pattern, int flags)
pattern - regular string expression to matchflags - pattern flags - e.g. Pattern.CASE_INSENSITIVEIllegalArgumentException - if the pattern is nullpublic RegexClassFilter(Pattern pattern)
pattern - regular expression to matchIllegalArgumentException - if the pattern is nullpublic String funcName()
funcName in interface ClassPathFilterpublic boolean accept(String className)
accept in interface ClassPathFilterclassName - the class name to matchpublic boolean accept(URL url)
accept in interface ClassPathFilterurl - the URL to matchpublic boolean accept(Class<?> clazz)
accept in interface ClassPathFilterclazz - the clazz to accept.public String[] args()
args in interface ClassPathFilterpublic Collection<URL> filterURLs(Collection<URL> collection)
filterURLs in interface ClassPathFiltercollection - the collection of classes to filter.public Collection<String> filterNames(Collection<String> collection)
filterNames in interface ClassPathFiltercollection - the collection of class names to filter.public Collection<Class<?>> filterClasses(Collection<Class<?>> collection)
filterClasses in interface ClassPathFiltercollection - the collection of classes to filter.public ClassPathFilter optimize()
optimize in interface ClassPathFilterCopyright © 2013-2017 XENEI.com. All Rights Reserved.