final class RegexpClassNameMatcher extends java.lang.Object implements ClassNameMatcher
ClassNameMatcher that uses regular expressions.
This object is immutable and thread-safe.
| Modifier and Type | Field and Description |
|---|---|
private java.util.regex.Pattern |
pattern |
| Constructor and Description |
|---|
RegexpClassNameMatcher(java.util.regex.Pattern pattern)
Constructs an object based on the specified pattern.
|
RegexpClassNameMatcher(java.lang.String regex)
Constructs an object based on the specified regular expression.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(java.lang.String className)
Returns
true if the supplied class name matches this object's condition. |
public RegexpClassNameMatcher(java.lang.String regex)
regex - a regular expression for evaluating acceptable class namespublic RegexpClassNameMatcher(java.util.regex.Pattern pattern)
pattern - a pattern for evaluating acceptable class namesjava.lang.IllegalArgumentException - if pattern is nullpublic boolean matches(java.lang.String className)
ClassNameMatchertrue if the supplied class name matches this object's condition.matches in interface ClassNameMatcherclassName - fully qualified class nametrue if the class name matches this object's conditionCopyright (c) 2002-2016 Apache Software Foundation