org.apache.ivy.plugins.matcher

Interface PatternMatcher

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
static StringANY_EXPRESSION
Any expression string: '*'
static StringEXACT
'exact' pattern matcher name
static StringEXACT_OR_REGEXP
pattern matcher name 'exactOrRegexp'
static StringGLOB
pattern matcher 'glob'
static StringREGEXP
pattern matcher name 'regexp'
Method Summary
MatchergetMatcher(String expression)
Return the matcher for the given expression.
StringgetName()
return the name of this pattern matcher

Field Detail

ANY_EXPRESSION

public static final String ANY_EXPRESSION
Any expression string: '*'

EXACT

public static final String EXACT
'exact' pattern matcher name

EXACT_OR_REGEXP

public static final String EXACT_OR_REGEXP
pattern matcher name 'exactOrRegexp'

GLOB

public static final String GLOB
pattern matcher 'glob'

REGEXP

public static final String REGEXP
pattern matcher name 'regexp'

Method Detail

getMatcher

public Matcher getMatcher(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

public 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