public class RegexClassFilter extends Object implements ClassFilter, Serializable
ClassFilter.UtilABSTRACT, ANNOTATION, FALSE, INTERFACE, 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)
Checks to see if the class name matches the regular expression.
|
boolean |
accept(String className)
Checks to see if the class name matches the regular expression.
|
String[] |
args()
Get the arguments for the function.
|
Collection<Class<?>> |
filter(Collection<Class<?>> collection)
Filter the collection.
|
Collection<String> |
filterNames(Collection<String> collection)
Filter the collection.
|
String |
funcName()
Function name for the filter.
|
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 ClassFilterpublic boolean accept(String className)
accept in interface ClassFilterclassName - the class name to matchpublic boolean accept(Class<?> clazz)
accept in interface ClassFilterclazz - the class to matchpublic String[] args()
args in interface ClassFilterpublic Collection<Class<?>> filter(Collection<Class<?>> collection)
filter in interface ClassFiltercollection - the collection of classes to filter.public Collection<String> filterNames(Collection<String> collection)
filterNames in interface ClassFiltercollection - the collection of class names to filter.Copyright © 2013-2016 XENEI.com. All Rights Reserved.