org.apache.commons.digester
Class SimpleRegexMatcher
public class SimpleRegexMatcher
Simple regex pattern matching algorithm.
This uses just two wildcards:
*
matches any sequence of none, one or more characters
?
matches any one character
Escaping these wildcards is not supported .
private static Log | baseLog - Default log (class wide)
|
private Log | log - Custom log (can be set per object)
|
Log | getLog() - Gets the
Log implementation.
|
boolean | match(String basePattern, String regexPattern) - Matches using simple regex algorithm.
|
private boolean | match(String basePattern, String regexPattern, int baseAt, int regexAt) - Implementation of regex matching algorithm.
|
void | setLog(Log log) - Sets the current
Log implementation used by this class.
|
baseLog
private static final Log baseLog
Default log (class wide)
log
private Log log
Custom log (can be set per object)
getLog
public Log getLog()
Gets the Log
implementation.
match
public boolean match(String basePattern,
String regexPattern)
Matches using simple regex algorithm.
- match in interface RegexMatcher
basePattern
- the standard digester path representing the elementregexPattern
- the regex pattern the path will be tested against
- true if the given pattern matches the given path
match
private boolean match(String basePattern,
String regexPattern,
int baseAt,
int regexAt)
Implementation of regex matching algorithm.
This calls itself recursively.
setLog
public void setLog(Log log)
Sets the current Log
implementation used by this class.
Copyright 2001-2005 The Apache Software Foundation.