public class UserFunctionReference extends Expression implements ComponentInvocation, UserFunctionResolvable
Modifier and Type | Class and Description |
---|---|
static class |
UserFunctionReference.BoundUserFunction |
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
UserFunctionReference(SymbolicName name) |
UserFunctionReference(UserFunction target) |
Modifier and Type | Method and Description |
---|---|
protected int |
computeCardinality()
Compute the static cardinality of this expression
|
Expression |
copy()
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
int |
getArity()
Get the arity of the function
|
int |
getBindingSlot()
Get the binding slot to be used.
|
Component |
getFixedTarget()
Get the target component if this is known in advance, that is, if the target component
is private or final.
|
FunctionItemType |
getFunctionItemType(TypeHierarchy th)
Get the item type of the function item
|
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType()
Determine the data type of the expression, if possible.
|
SymbolicName |
getSymbolicName()
Get the symbolic name of the component that this invocation references
|
void |
setBindingSlot(int slot)
Set the binding slot to be used.
|
void |
setFunction(UserFunction function) |
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeSpecialProperties, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExpressionCompiler, getExpressionName, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operands, operandSparseList, optimize, optimizeChildren, optimizeForType, process, promote, promoteChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toStreamingPattern, toString, typeCheck, typeCheckChildren, typeError, unordered
public UserFunctionReference(UserFunction target)
public UserFunctionReference(SymbolicName name)
public void setFunction(UserFunction function)
setFunction
in interface UserFunctionResolvable
public int getBindingSlot()
getBindingSlot
in interface ComponentInvocation
public Component getFixedTarget()
getFixedTarget
in interface ComponentInvocation
public void setBindingSlot(int slot)
setBindingSlot
in interface ComponentInvocation
slot
- the offset in the binding vector of the containing package where the target component
can be found.public SymbolicName getSymbolicName()
getSymbolicName
in interface ComponentInvocation
public FunctionItemType getFunctionItemType(TypeHierarchy th)
th
- the type hierarchy cachepublic StructuredQName getFunctionName()
public int getArity()
protected int computeCardinality()
computeCardinality
in class Expression
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public int getImplementationMethod()
getImplementationMethod
in class Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public ItemType getItemType()
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in class Expression
public Expression copy()
copy
in class Expression
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in class Expression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic void export(ExpressionPresenter out)
Expression
export
in class Expression
out
- the expression presenter used to display the structureCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.