public class Matches extends SystemFunction
operation
argument
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor and Description |
---|
Matches() |
Modifier and Type | Method and Description |
---|---|
Item |
evaluateItem(XPathContext c)
Evaluate the matches() function to give a Boolean value.
|
Expression |
simplify(StaticContext env)
Simplify and validate.
|
static RegularExpression |
tryToCompile(Expression[] args,
int patternArg,
int flagsArg,
StaticContext env)
Try to precompile the arguments to the function.
|
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault
checkArgumentCount, getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplifyArguments, typeCheck
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeError
public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class FunctionCall
env
- the static contextStaticError
- if any error is found (e.g. invalid regular expression)XPathException
- if an error is discovered during expression
rewritingpublic Item evaluateItem(XPathContext c) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
c
- The dynamic evaluation contextXPathException
- on an errorpublic static RegularExpression tryToCompile(Expression[] args, int patternArg, int flagsArg, StaticContext env) throws XPathException
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 flagsXPathException
- if any failure occurs, in particular, if the regular
expression is invalid