Package net.sf.saxon.functions
Class RegexFunction
- java.lang.Object
- 
- net.sf.saxon.functions.AbstractFunction
- 
- net.sf.saxon.functions.SystemFunction
- 
- net.sf.saxon.functions.RegexFunction
 
 
 
- 
- All Implemented Interfaces:
- Callable,- StatefulSystemFunction,- Function,- GroundedValue,- Item,- Sequence
 - Direct Known Subclasses:
- AnalyzeStringFn,- Matches,- Replace,- ReplaceWith,- Tokenize_3
 
 public abstract class RegexFunction extends SystemFunction implements StatefulSystemFunction This class implements any of the functions matches(), replace(), tokenize(), analyze-string(), in the version where a flags argument is present in the argument list
- 
- 
Constructor SummaryConstructors Constructor Description RegexFunction()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanallowRegexMatchingEmptyString()RegexFunctioncopy()Make a copy of this SystemFunction.protected RegularExpressiongetRegularExpression(Sequence[] args)Get the regular expression at evaluation timeRegularExpressiongetStaticRegex()ExpressionmakeFunctionCall(Expression... arguments)Make an expression that either calls this function, or that is equivalent to a call on this functionExpressionmakeOptimizedFunctionCall(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments)Allow the function to create an optimized call based on the values of the actual arguments- 
Methods inherited from class net.sf.saxon.functions.SystemFunctiondependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, getUniStringArg, hashCode, importAttributes, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
 - 
Methods inherited from class net.sf.saxon.functions.AbstractFunctionatomize, deepEquals, effectiveBooleanValue, getAnnotations, getSerialNumber, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheck
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface net.sf.saxon.om.GroundedValueasIterable, concatenate, containsNode, materialize
 - 
Methods inherited from interface net.sf.saxon.om.ItemgetLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
 - 
Methods inherited from interface net.sf.saxon.om.SequencemakeRepeatable
 
- 
 
- 
- 
- 
Method Detail- 
getStaticRegexpublic RegularExpression getStaticRegex() 
 - 
copypublic RegexFunction copy() Make a copy of this SystemFunction. This is required only for system functions such as regex functions that maintain state on behalf of a particular caller.- Specified by:
- copyin interface- StatefulSystemFunction
- Returns:
- a copy of the system function able to contain its own copy of the state on behalf of the caller.
 
 - 
allowRegexMatchingEmptyStringprotected abstract boolean allowRegexMatchingEmptyString() 
 - 
makeFunctionCallpublic Expression makeFunctionCall(Expression... arguments) Make an expression that either calls this function, or that is equivalent to a call on this function- Overrides:
- makeFunctionCallin class- SystemFunction
- Parameters:
- arguments- the supplied arguments to the function call
- Returns:
- either a function call on this function, or an expression that delivers the same result
 
 - 
makeOptimizedFunctionCallpublic Expression makeOptimizedFunctionCall(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments) throws XPathException Allow the function to create an optimized call based on the values of the actual arguments- Overrides:
- makeOptimizedFunctionCallin class- SystemFunction
- Parameters:
- visitor- the expression visitor
- contextInfo- information about the context item
- arguments- the supplied arguments to the function call. Note: modifying the contents of this array should not be attempted, it is likely to have no effect.
- Returns:
- either a function call on this function, or an expression that delivers the same result, or null indicating that no optimization has taken place
- Throws:
- XPathException- if an error is detected
 
 - 
getRegularExpressionprotected RegularExpression getRegularExpression(Sequence[] args) throws XPathException Get the regular expression at evaluation time- Parameters:
- args- the argument values in the function call
- Returns:
- the compiled regular expression; either the expression pre-compiled statically, or the result of compiling it dynamically
- Throws:
- XPathException- if the regular expression is invalid
 
 
- 
 
-