public class UserFunctionItem extends AbstractFunctionItem
Modifier and Type | Field and Description |
---|---|
protected UserFunctionCall |
target |
Constructor and Description |
---|
UserFunctionItem(UserFunctionCall target) |
Modifier and Type | Method and Description |
---|---|
Sequence |
call(XPathContext context,
Sequence[] args)
Invoke the function
|
void |
explain(ExpressionPresenter out) |
int |
getArity()
Get the arity of the function
|
FunctionItemType |
getFunctionItemType(TypeHierarchy th)
Determine the item type of the items in the value
|
StructuredQName |
getFunctionName()
Get the name of the function
|
UserFunctionCall |
getUserFunctionCall()
Get the underlying UserFunctionCall
|
void |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Optimize the function (may modify it)
|
void |
simplify(ExpressionVisitor visitor) |
void |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Type check the function (may modify it by adding code for converting the arguments)
|
deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, getTypedValue
getLength, head, itemAt, iterate, reduce, subsequence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
iterate
getLength, head, itemAt, reduce, subsequence
protected UserFunctionCall target
public UserFunctionItem(UserFunctionCall target)
public UserFunctionCall getUserFunctionCall()
public int getArity()
public StructuredQName getFunctionName()
public FunctionItemType getFunctionItemType(TypeHierarchy th)
th
- public void simplify(ExpressionVisitor visitor) throws XPathException
simplify
in class AbstractFunctionItem
XPathException
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
typeCheck
in class AbstractFunctionItem
visitor
- the expression visitor, supplies context informationcontextItemType
- the context item type at the point where the function definition appearsXPathException
public void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
optimize
in class AbstractFunctionItem
visitor
- the expression visitor, supplies context informationcontextItemType
- the context item type at the point where the function definition appearsXPathException
public Sequence call(XPathContext context, Sequence[] args) throws XPathException
context
- the XPath dynamic evaluation contextargs
- the actual arguments to be suppliedXPathException
public void explain(ExpressionPresenter out)
explain
in class AbstractFunctionItem
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.