Package org.apache.commons.digester3
Class SimpleRegexMatcher
java.lang.Object
org.apache.commons.digester3.RegexMatcher
org.apache.commons.digester3.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
Modifier and TypeMethodDescriptionorg.apache.commons.logging.Log
getLog()
Gets theLog
implementation.boolean
Returns true if the given pattern matches the given path according to the regex algorithm that this strategy applies.private boolean
Implementation of regex matching algorithm.void
setLog
(org.apache.commons.logging.Log log) Sets the currentLog
implementation used by this class.
-
Field Details
-
BASE_LOG
private static final org.apache.commons.logging.Log BASE_LOGDefault log (class wide) -
log
private org.apache.commons.logging.Log logCustom log (can be set per object)
-
-
Constructor Details
-
SimpleRegexMatcher
public SimpleRegexMatcher()
-
-
Method Details
-
getLog
public org.apache.commons.logging.Log getLog()Gets theLog
implementation.- Returns:
- the
Log
implementation.
-
setLog
public void setLog(org.apache.commons.logging.Log log) Sets the currentLog
implementation used by this class.- Parameters:
log
- the currentLog
implementation used by this class.
-
match
Returns true if the given pattern matches the given path according to the regex algorithm that this strategy applies.- 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.- Parameters:
basePattern
- the standard digester path representing the elementregexPattern
- the regex pattern the path will be tested againstbaseAt
- FIXMEregexAt
- FIXME
-