Package org.apache.ivy.plugins.matcher
Interface PatternMatcher
-
- All Known Implementing Classes:
AbstractPatternMatcher
,ExactOrRegexpPatternMatcher
,ExactPatternMatcher
,GlobPatternMatcher
,RegexpPatternMatcher
public interface PatternMatcher
Interface 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.String
ANY_EXPRESSION
Any expression string: '*'static java.lang.String
EXACT
'exact' pattern matcher namestatic java.lang.String
EXACT_OR_REGEXP
pattern matcher name 'exactOrRegexp'static java.lang.String
GLOB
pattern matcher 'glob'static java.lang.String
REGEXP
pattern matcher name 'regexp'
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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
-
-
-
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
-
-