org.quattor.pan.dml.functions
Class AbstractMatcher
java.lang.Object
org.quattor.pan.dml.AbstractOperation
org.quattor.pan.dml.functions.BuiltInFunction
org.quattor.pan.dml.functions.AbstractMatcher
- All Implemented Interfaces:
- Operation
- Direct Known Subclasses:
- AbstractStaticMatcher, AbstractVariableMatcher
public abstract class AbstractMatcher
- extends BuiltInFunction
Determine whether a string matches a given regular expression, using optional
matching flags.
- Author:
- loomis
|
Method Summary |
protected java.util.regex.Pattern |
compilePattern(Element regex,
int flags)
Generate a Pattern from the given string and flags. |
protected int |
convertMatchFlags(Element opts)
A utility function to convert a string containing match options to the
associated integer with the appropriate bits set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractMatcher
protected AbstractMatcher(java.lang.String name,
SourceRange sourceRange,
Operation... operations)
throws SyntaxException
- Throws:
SyntaxException
convertMatchFlags
protected int convertMatchFlags(Element opts)
- A utility function to convert a string containing match options to the
associated integer with the appropriate bits set.
- Parameters:
opts - string containing matching flags
- Returns:
- integer with appropriate bits set
compilePattern
protected java.util.regex.Pattern compilePattern(Element regex,
int flags)
- Generate a Pattern from the given string and flags.
- Parameters:
regex - regular expression to compileflags - matching flags to use for pattern
- Returns:
- Pattern corresponding to the given regular expression and
matching flags
Copyright © 2011 Quattor. All Rights Reserved.