Package org.apache.commons.digester
Class SimpleRegexMatcher
- java.lang.Object
-
- org.apache.commons.digester.RegexMatcher
-
- org.apache.commons.digester.SimpleRegexMatcher
-
public class SimpleRegexMatcher extends RegexMatcher
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
-
-
Constructor Summary
Constructors Constructor Description SimpleRegexMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.logging.LoggetLog()Gets theLogimplementation.booleanmatch(java.lang.String basePattern, java.lang.String regexPattern)Matches using simple regex algorithm.private booleanmatch(java.lang.String basePattern, java.lang.String regexPattern, int baseAt, int regexAt)Implementation of regex matching algorithm.voidsetLog(org.apache.commons.logging.Log log)Sets the currentLogimplementation used by this class.
-
-
-
Method Detail
-
getLog
public org.apache.commons.logging.Log getLog()
Gets theLogimplementation.
-
setLog
public void setLog(org.apache.commons.logging.Log log)
Sets the currentLogimplementation used by this class.
-
match
public boolean match(java.lang.String basePattern, java.lang.String regexPattern)Matches using simple regex algorithm.- Specified by:
matchin 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
private boolean match(java.lang.String basePattern, java.lang.String regexPattern, int baseAt, int regexAt)Implementation of regex matching algorithm. This calls itself recursively.
-
-