public class NameClassFilter extends _AbstractStringFilter implements Serializable
ClassPathFilter.UtilcaseSensitivityNO_ARGSABSTRACT_CLASS, ANNOTATION_CLASS, FALSE, INTERFACE_CLASS, TRUE| Constructor and Description |
|---|
NameClassFilter(Case caseSensitivity,
Collection<String> names)
Constructs a new name class filter for a collection of names specifying
case-sensitivity.
|
NameClassFilter(Case caseSensitivity,
String... names)
Constructs a new name class filter for an array of names specifying
case-sensitivity.
|
NameClassFilter(Case caseSensitivity,
String name)
Construct a new name class filter specifying case-sensitivity.
|
NameClassFilter(Collection<String> names)
Constructs a new case-sensitive name class filter for a collection of
names.
|
NameClassFilter(String... names)
Constructs a new case-sensitive name class filter for an array of names.
|
NameClassFilter(String name)
Constructs a new case-sensitive name class filter for a single name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(String className)
Checks to see if the name matches.
|
NameClassFilter |
addClass(Class<?> clazz)
Add a string to the filter.
|
NameClassFilter |
addClasses(Class<?>... classes)
Add an array of strings to the filter.
|
NameClassFilter |
addClasses(Collection<Class<?>> classes)
Add a collection of strings to the filter.
|
protected org.apache.commons.logging.Log |
getLog() |
ClassPathFilter |
optimize() |
accept, accept, addString, addStrings, addStrings, args, getStrings, toStringequals, filterClasses, filterNames, filterURLs, funcName, hashCode, loadClassclone, finalize, getClass, notify, notifyAll, wait, wait, waitfilterClasses, filterNames, filterURLs, funcNamepublic NameClassFilter(String name)
name - the name to allow, must not be nullIllegalArgumentException - if the name is nullpublic NameClassFilter(Case caseSensitivity, String name)
caseSensitivity - how to handle case sensitivity, null means case-sensitivename - the name to allow, must not be nullIllegalArgumentException - if the name is nullpublic NameClassFilter(String... names)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
names - the names to allow, must not be nullIllegalArgumentException - if the names array is nullpublic NameClassFilter(Case caseSensitivity, String... names)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
caseSensitivity - how to handle case sensitivity, null means case-sensitivenames - the names to allow, must not be nullIllegalArgumentException - if the names array is nullpublic NameClassFilter(Collection<String> names)
names - the names to allow, must not be nullIllegalArgumentException - if the name list is nullClassCastException - if the list does not contain Stringspublic NameClassFilter(Case caseSensitivity, Collection<String> names)
caseSensitivity - how to handle case sensitivity, null means case-sensitivenames - the names to allow, must not be nullIllegalArgumentException - if the name list is nullClassCastException - if the list does not contain Stringsprotected org.apache.commons.logging.Log getLog()
getLog in class _AbstractBaseFilterpublic boolean accept(String className)
accept in interface ClassPathFilterclassName - the class name to checkpublic NameClassFilter addClass(Class<?> clazz)
str - the string to add.public final NameClassFilter addClasses(Collection<Class<?>> classes)
strings - the collection of strings to be added.public final NameClassFilter addClasses(Class<?>... classes)
strings - The strings to add.public ClassPathFilter optimize()
optimize in interface ClassPathFilterCopyright © 2013-2017 XENEI.com. All Rights Reserved.