|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.expr.FunctionCall
|
+--net.sf.saxon.functions.SystemFunction
|
+--net.sf.saxon.functions.Matches
This class implements the matches() function for regular expression matching
| Field Summary |
| Fields inherited from class net.sf.saxon.functions.SystemFunction |
operation |
| Fields inherited from class net.sf.saxon.expr.FunctionCall |
argument |
| Fields inherited from class net.sf.saxon.expr.ComputedExpression |
locationId, staticProperties |
| Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
| Constructor Summary | |
Matches()
|
|
| Method Summary | |
Item |
evaluateItem(XPathContext c)
Evaluate the matches() function to give a Boolean value. |
static int |
setFlags(java.lang.String inFlags)
Set the Java flags from the supplied XPath flags. |
Expression |
simplify(StaticContext env)
Simplify and validate. |
protected static java.util.regex.Pattern |
tryToCompile(Expression[] args,
int patternArg,
int flagsArg)
Try to precompile the arguments to the function. |
| Methods inherited from class net.sf.saxon.functions.SystemFunction |
addContextDocumentArgument, checkArguments, computeCardinality, display, getDetails, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault |
| Methods inherited from class net.sf.saxon.expr.FunctionCall |
analyze, checkArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, preEvaluate, promote, setArguments, setFunctionNameCode, simplifyArguments |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Matches()
| Method Detail |
public Expression simplify(StaticContext env)
throws XPathException
simplify in interface Expressionsimplify in class FunctionCallStaticError - if any error is found (e.g. invalid regular expression)
XPathException - if an error is discovered during expression
rewriting
public static int setFlags(java.lang.String inFlags)
throws StaticError
inFlags - the flags as a string, e.g. "im"
StaticError - if the supplied value is invalid
protected static java.util.regex.Pattern tryToCompile(Expression[] args,
int patternArg,
int flagsArg)
throws StaticError
args - the supplied arguments to the function, as an arraypatternArg - the position of the argument containing the regular expressionflagsArg - the position of the argument containing the flags
StaticError - if any failure occurs, in particular, if the regular
expression is invalid
public Item evaluateItem(XPathContext c)
throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressionc - The dynamic evaluation context
XPathException - on an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||