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 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. |
AbstractMatcher
protected AbstractMatcher(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 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 © 2012 Quattor. All Rights Reserved.