|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(ValueRepresentation[] values)
Curry a function by binding one or more (but not all) of its arguments |
boolean |
deepEquals(FunctionItem other,
XPathContext context,
GenericAtomicComparer comparer,
int flags)
Test whether this FunctionItem is deep-equal to another function item, under the rules of the deep-equal function |
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,
ExpressionVisitor.ContextItemType contextItemType)
Optimize the function (may modify it) |
void |
simplify(ExpressionVisitor visitor)
|
void |
typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType 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 Item
getStringValue
in interface ValueRepresentation
UnsupportedOperationException
- (the string value of a function item is not defined)Item.getStringValueCS()
public CharSequence getStringValueCS()
getStringValueCS
in interface Item
getStringValueCS
in interface ValueRepresentation
UnsupportedOperationException
- (the string value of a function item is not defined)Item.getStringValue()
public SequenceIterator getTypedValue() throws XPathException
getTypedValue
in interface Item
XPathException
- (always) - a function item cannot be atomizedpublic void simplify(ExpressionVisitor visitor) throws XPathException
XPathException
public void typeCheck(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType 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, ExpressionVisitor.ContextItemType 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(ValueRepresentation[] values) throws XPathException
curry
in interface FunctionItem
values
- the values to which the arguments are to be bound
XPathException
- if any dynamic error occurspublic 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)
public boolean deepEquals(FunctionItem other, XPathContext context, GenericAtomicComparer comparer, int flags) throws XPathException
deepEquals
in interface FunctionItem
other
- the other function itemcontext
- the dynamic evaluation contextcomparer
- the object to perform the comparisonflags
- options for how the comparison is performed
XPathException
- if the comparison cannot be performed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |