Package org.apache.commons.digester
Class SimpleRegexMatcher
java.lang.Object
org.apache.commons.digester.RegexMatcher
org.apache.commons.digester.SimpleRegexMatcher
Simple regex pattern matching algorithm.
This uses just two wildcards:
*
matches any sequence of none, one or more characters?
matches any one character
- Since:
- 1.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
baseLog
private static final Log baseLogDefault log (class wide) -
log
private Log logCustom log (can be set per object)
-
-
Constructor Details
-
SimpleRegexMatcher
public SimpleRegexMatcher()
-
-
Method Details
-
getLog
public Log getLog()Gets theLog
implementation. -
setLog
public void setLog(Log log) Sets the currentLog
implementation used by this class. -
match
Matches using simple regex algorithm.- Specified by:
match
in classRegexMatcher
- Parameters:
basePattern
- the standard digester path representing the elementregexPattern
- the regex pattern the path will be tested against- Returns:
- true if the given pattern matches the given path
-
match
Implementation of regex matching algorithm. This calls itself recursively.
-