public class AccumulatorFunctionCallPE extends FunctionCall
Modifier and Type | Field and Description |
---|---|
protected Accumulator |
accumulator |
argument
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD
Constructor and Description |
---|
AccumulatorFunctionCallPE(Accumulator accumulator,
boolean isPostDescentFunction)
Create the call on an accumulator function
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(ExpressionVisitor visitor)
Method supplied by each class of function to check arguments during parsing, when all
the argument expressions have been read
|
protected int |
computeCardinality()
Compute the static cardinality of this expression
|
int |
computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions.
|
Expression |
copy()
Copy an expression.
|
StructuredQName |
getFunctionName()
Get the qualified of the function being called
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible.
|
boolean |
isPostDescentFunction() |
SequenceIterator<? extends Item> |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.
|
Expression |
preEvaluate(ExpressionVisitor visitor)
Pre-evaluate a function at compile time.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Type-check the expression.
|
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getExpressionName, getNumberOfArguments, hashCode, iterateSubExpressions, optimize, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeSpecialProperties, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getExpressionCompiler, getHostLanguage, getImplementationMethod, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSubExpressionInfo, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeError
protected Accumulator accumulator
public AccumulatorFunctionCallPE(Accumulator accumulator, boolean isPostDescentFunction)
accumulator
- the accumulator whose value is requiredisPostDescentFunction
- true if this is the post-descent function name, false for the pre-descent functionpublic StructuredQName getFunctionName()
FunctionCall
getFunctionName
in class FunctionCall
public boolean isPostDescentFunction()
protected void checkArguments(ExpressionVisitor visitor) throws XPathException
FunctionCall
checkArguments
in class FunctionCall
visitor
- the expression visitorXPathException
- if the arguments are incorrectpublic Expression typeCheck(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
FunctionCall
typeCheck
in class FunctionCall
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException
FunctionCall
preEvaluate
in class FunctionCall
visitor
- an expression visitorXPathException
- if evaluation failspublic ItemType getItemType(TypeHierarchy th)
Expression
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in class Expression
th
- the type hierarchy cachepublic int computeDependencies()
Expression
computeDependencies
in class Expression
protected int computeCardinality()
Expression
computeCardinality
in class Expression
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public Expression copy()
Expression
copy
in class Expression
public SequenceIterator<? extends Item> iterate(XPathContext context) throws XPathException
Expression
iterate
in class Expression
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.