|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.saxonica.functions.hof.AbstractFunctionItem
public abstract class AbstractFunctionItem
Abstract superclass (and factory class) for implementations of FunctionItem
| Field Summary |
|---|
| Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
|---|
EMPTY_VALUE_ARRAY |
| Constructor Summary | |
|---|---|
AbstractFunctionItem()
|
|
| Method Summary | |
|---|---|
static AbstractFunctionItem |
bind(StructuredQName functionName,
int arity,
StaticContext env,
Container container)
Factory method to create a function item representing a function item literal |
FunctionItem |
curry(int arg,
ValueRepresentation value)
Curry a function by binding one of its arguments |
void |
explain(ExpressionPresenter out)
|
String |
getStringValue()
Get the string value of the function item |
CharSequence |
getStringValueCS()
Get the string value of the function item |
SequenceIterator |
getTypedValue()
Get the typed value of the item. |
void |
optimize(ExpressionVisitor visitor,
ItemType contextItemType)
Optimize the function (may modify it) |
void |
typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
Type check the function (may modify it by adding code for converting the arguments) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.om.FunctionItem |
|---|
getArity, getFunctionItemType, getFunctionName, invoke |
| Constructor Detail |
|---|
public AbstractFunctionItem()
| Method Detail |
|---|
public String getStringValue()
getStringValue in interface ItemgetStringValue in interface ValueRepresentationUnsupportedOperationException - (the string value of a function item is not defined)Item.getStringValueCS()public CharSequence getStringValueCS()
getStringValueCS in interface ItemgetStringValueCS in interface ValueRepresentationUnsupportedOperationException - (the string value of a function item is not defined)Item.getStringValue()
public SequenceIterator getTypedValue()
throws XPathException
getTypedValue in interface ItemXPathException - (always) - a function item cannot be atomized
public void typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
throws XPathException
visitor - the expression visitor, supplies context informationcontextItemType - the context item type at the point where the function definition appears
XPathException
public void optimize(ExpressionVisitor visitor,
ItemType contextItemType)
throws XPathException
visitor - the expression visitor, supplies context informationcontextItemType - the context item type at the point where the function definition appears
XPathException
public FunctionItem curry(int arg,
ValueRepresentation value)
throws XPathException
curry in interface FunctionItemarg - the argument to be found (1-based)value - the value to which the argument is to be bound
XPathException
public static AbstractFunctionItem bind(StructuredQName functionName,
int arity,
StaticContext env,
Container container)
throws XPathException
functionName - the name of the function to be calledarity - the arity of the functionenv - the static context of the function item literal
XPathException - for example if there is no function with the specified name and arity
in the static contextpublic void explain(ExpressionPresenter out)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||