public abstract class AbstractPatternMatcher extends java.lang.Object implements PatternMatcher
ANY_EXPRESSION, EXACT, EXACT_OR_REGEXP, GLOB, REGEXP
Constructor and Description |
---|
AbstractPatternMatcher(java.lang.String name)
Create a new instance of a pattern matcher
|
Modifier and Type | Method and Description |
---|---|
Matcher |
getMatcher(java.lang.String expression)
Return the matcher for the given expression.
|
java.lang.String |
getName()
return the name of this pattern matcher
|
protected abstract Matcher |
newMatcher(java.lang.String expression)
Returns an instance of the implementation specific matcher.
|
java.lang.String |
toString() |
public AbstractPatternMatcher(java.lang.String name)
name
- the name of the pattern matcher. Never null.public Matcher getMatcher(java.lang.String expression)
PatternMatcher
getMatcher
in interface PatternMatcher
expression
- the expression to be matched. Cannot be null ?public java.lang.String getName()
PatternMatcher
getName
in interface PatternMatcher
PatternMatcher.EXACT
,
PatternMatcher.REGEXP
,
PatternMatcher.GLOB
,
PatternMatcher.EXACT_OR_REGEXP
protected abstract Matcher newMatcher(java.lang.String expression)
expression
- the string to be matched.public java.lang.String toString()
toString
in class java.lang.Object