Package org.apache.ivy.plugins.matcher
Interface PatternMatcher
-
- All Known Implementing Classes:
AbstractPatternMatcher,ExactOrRegexpPatternMatcher,ExactPatternMatcher,GlobPatternMatcher,RegexpPatternMatcher
public interface PatternMatcherInterface for a pattern matcher.The pattern matcher is the main abstraction regarding the matching of an expression. Implementation may vary depending on the expression syntax handling that is desired.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANY_EXPRESSIONAny expression string: '*'static java.lang.StringEXACT'exact' pattern matcher namestatic java.lang.StringEXACT_OR_REGEXPpattern matcher name 'exactOrRegexp'static java.lang.StringGLOBpattern matcher 'glob'static java.lang.StringREGEXPpattern matcher name 'regexp'
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchergetMatcher(java.lang.String expression)Return the matcher for the given expression.java.lang.StringgetName()return the name of this pattern matcher
-
-
-
Field Detail
-
EXACT
static final java.lang.String EXACT
'exact' pattern matcher name- See Also:
- Constant Field Values
-
REGEXP
static final java.lang.String REGEXP
pattern matcher name 'regexp'- See Also:
- Constant Field Values
-
GLOB
static final java.lang.String GLOB
pattern matcher 'glob'- See Also:
- Constant Field Values
-
EXACT_OR_REGEXP
static final java.lang.String EXACT_OR_REGEXP
pattern matcher name 'exactOrRegexp'- See Also:
- Constant Field Values
-
ANY_EXPRESSION
static final java.lang.String ANY_EXPRESSION
Any expression string: '*'- See Also:
- Constant Field Values
-
-
Method Detail
-
getMatcher
Matcher getMatcher(java.lang.String expression)
Return the matcher for the given expression.- Parameters:
expression- the expression to be matched. Cannot be null ?- Returns:
- the matcher instance for the given expression. Never null.
-
getName
java.lang.String getName()
return the name of this pattern matcher- Returns:
- the name of this pattern matcher. Never null.
- See Also:
EXACT,REGEXP,GLOB,EXACT_OR_REGEXP
-
-