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 regular expression.- Parameters:
regex
- a regular expression for evaluating acceptable class names
-
RegexpClassNameMatcher
Constructs an object based on the specified pattern.- Parameters:
pattern
- a pattern for evaluating acceptable class names- Throws:
IllegalArgumentException
- ifpattern
is null
-
-
Method Details
-
matches
Description copied from interface:ClassNameMatcher
Returnstrue
if the supplied class name matches this object's condition.- Specified by:
matches
in interfaceClassNameMatcher
- Parameters:
className
- fully qualified class name- Returns:
true
if the class name matches this object's condition
-