public class UserFunctionCall extends FunctionCall implements InstructionInfoProvider
Modifier and Type | Class and Description |
---|---|
class |
UserFunctionCall.FunctionCallPackage
Inner class used to wrap up the set of actual arguments to a tail-recursive call of
the containing function.
|
argument
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor and Description |
---|
UserFunctionCall() |
Modifier and Type | Method and Description |
---|---|
void |
checkArguments(StaticContext env)
Method called during the type checking phase
|
void |
checkFunctionCall(UserFunction compiledFunction,
StaticContext env)
Check the function call against the declared function signature
|
int |
computeCardinality()
Determine the cardinality of the result
|
void |
display(int level,
NamePool pool,
PrintStream out)
Diagnostic print of expression structure.
|
ValueRepresentation |
dynamicCall(ValueRepresentation[] suppliedArguments,
XPathContext context)
Call the function dynamically.
|
Item |
evaluateItem(XPathContext c)
Call the function, returning the value as an item.
|
Expression[] |
getArguments()
Get the arguments (the expressions supplied in the function call)
|
UserFunction |
getFunction()
Get the function that is being called by this function call
|
InstructionInfo |
getInstructionInfo()
Get diagnostic information about this expression
|
int |
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived
from the dependencies of its subexpressions.
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible
|
boolean |
isConfirmed()
Determine whether this function call is confirmed
|
SequenceIterator |
iterate(XPathContext c)
Call the function, returning an iterator over the results.
|
boolean |
markTailFunctionCalls()
Mark tail-recursive calls on stylesheet functions.
|
Expression |
preEvaluate(StaticContext env)
Pre-evaluate a function at compile time.
|
void |
setConfirmed(boolean conf)
Set this function as confirmed (the function being called is known to exist) or not
|
void |
setFunction(UserFunction compiledFunction,
StaticContext env)
Create the reference to the function to be called, and validate for consistency
|
void |
setStaticType(SequenceType type)
Set the static type
|
Expression |
simplify(StaticContext env)
Simplify the function call
|
checkArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, setArguments, setFunctionNameCode, simplifyArguments, typeCheck
adoptChildExpression, checkPermittedContents, computeDependencies, computeSpecialProperties, computeStaticProperties, doPromotion, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, process, resetStaticProperties, setLocationId, setParentExpression, suppressValidation, typeError, typeError
public void setStaticType(SequenceType type)
public void setFunction(UserFunction compiledFunction, StaticContext env) throws XPathException
XPathException
public void checkFunctionCall(UserFunction compiledFunction, StaticContext env) throws XPathException
XPathException
public UserFunction getFunction()
public void setConfirmed(boolean conf)
public boolean isConfirmed()
public Expression[] getArguments()
public void checkArguments(StaticContext env) throws XPathException
checkArguments
in class FunctionCall
XPathException
public Expression preEvaluate(StaticContext env)
preEvaluate
in class FunctionCall
public ItemType getItemType(TypeHierarchy th)
getItemType
in interface Expression
th
- public int getIntrinsicDependencies()
ComputedExpression
getIntrinsicDependencies
in class ComputedExpression
public int computeCardinality()
computeCardinality
in class ComputedExpression
public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class FunctionCall
XPathException
- if an error is discovered during expression
rewritingpublic boolean markTailFunctionCalls()
markTailFunctionCalls
in class ComputedExpression
public Item evaluateItem(XPathContext c) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
c
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic SequenceIterator iterate(XPathContext c) throws XPathException
iterate
in interface Expression
iterate
in class ComputedExpression
c
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic ValueRepresentation dynamicCall(ValueRepresentation[] suppliedArguments, XPathContext context) throws XPathException
XPathException
public void display(int level, NamePool pool, PrintStream out)
Expression
display
in interface Expression
display
in class FunctionCall
level
- indentation level for this expressionpool
- NamePool used to expand any names appearing in the expressionout
- Output destinationpublic InstructionInfo getInstructionInfo()
getInstructionInfo
in interface InstructionInfoProvider
getInstructionInfo
in class ComputedExpression