Class RegexpClassNameMatcher
java.lang.Object
org.apache.commons.io.serialization.RegexpClassNameMatcher
- All Implemented Interfaces:
ClassNameMatcher
A
ClassNameMatcher that uses regular expressions.
This object is immutable and thread-safe.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegexpClassNameMatcher(String regex) Constructs an object based on the specified regular expression.RegexpClassNameMatcher(Pattern pattern) Constructs an object based on the specified pattern. -
Method Summary
-
Field Details
-
pattern
-
-
Constructor Details
-
RegexpClassNameMatcher
Constructs an object based on the specified pattern.- Parameters:
pattern- a pattern for evaluating acceptable class names- Throws:
NullPointerException- ifpatternis null
-
RegexpClassNameMatcher
Constructs an object based on the specified regular expression.- Parameters:
regex- a regular expression for evaluating acceptable class names
-
-
Method Details
-
matches
Description copied from interface:ClassNameMatcherReturnstrueif the supplied class name matches this object's condition.- Specified by:
matchesin interfaceClassNameMatcher- Parameters:
className- fully qualified class name- Returns:
trueif the class name matches this object's condition
-