Package org.apache.ivy.plugins.matcher
Class AbstractPatternMatcher
java.lang.Object
org.apache.ivy.plugins.matcher.AbstractPatternMatcher
- All Implemented Interfaces:
PatternMatcher
- Direct Known Subclasses:
ExactOrRegexpPatternMatcher,ExactPatternMatcher,GlobPatternMatcher,RegexpPatternMatcher
An abstract implementation of the pattern matcher providing base template methods
-
Field Summary
Fields inherited from interface org.apache.ivy.plugins.matcher.PatternMatcher
ANY_EXPRESSION, EXACT, EXACT_OR_REGEXP, GLOB, REGEXP -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPatternMatcher(String name) Create a new instance of a pattern matcher -
Method Summary
Modifier and TypeMethodDescriptiongetMatcher(String expression) Return the matcher for the given expression.getName()return the name of this pattern matcherprotected abstract MatchernewMatcher(String expression) Returns an instance of the implementation specific matcher.toString()
-
Constructor Details
-
AbstractPatternMatcher
Create a new instance of a pattern matcher- Parameters:
name- the name of the pattern matcher. Never null.
-
-
Method Details
-
getMatcher
Description copied from interface:PatternMatcherReturn the matcher for the given expression.- Specified by:
getMatcherin interfacePatternMatcher- Parameters:
expression- the expression to be matched. Cannot be null ?- Returns:
- the matcher instance for the given expression. Never null.
-
getName
Description copied from interface:PatternMatcherreturn the name of this pattern matcher- Specified by:
getNamein interfacePatternMatcher- Returns:
- the name of this pattern matcher. Never null.
- See Also:
-
newMatcher
Returns an instance of the implementation specific matcher.- Parameters:
expression- the string to be matched.- Returns:
- the instance of the related matcher. Never null.
-
toString
-