public abstract class AbstractFunction extends java.lang.Object implements Function
Constructor and Description |
---|
AbstractFunction() |
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
atomize()
Atomize the item.
|
boolean |
deepEquals(Function other,
XPathContext context,
AtomicComparer comparer,
int flags)
Test whether this FunctionItem is deep-equal to another function item,
under the rules of the deep-equal function
|
boolean |
effectiveBooleanValue()
Get the effective boolean value of the function item
|
void |
export(ExpressionPresenter out)
Output information about this function item to the diagnostic explain() output
|
AnnotationList |
getAnnotations()
Get the function annotations (as defined in XQuery).
|
OperandRole[] |
getOperandRoles()
Get the roles of the arguments, for the purposes of streaming
|
java.lang.String |
getStringValue()
Get the string value of the function
|
java.lang.CharSequence |
getStringValueCS()
Get the string value of the function
|
boolean |
isArray()
Ask whether this function is an array
|
boolean |
isMap()
Ask whether this function is a map
|
boolean |
isTrustedResultType()
Check that result type is SystemFunction or AtomicConstructorFunction
|
XPathContext |
makeNewContext(XPathContext callingContext,
ContextOriginator originator)
Prepare an XPathContext object for evaluating the function
|
void |
simplify() |
void |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Type check the function (may modify it by adding code for converting the arguments)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
argumentArray, call, getArity, getDescription, getFunctionItemType, getFunctionName, getGenre, toShortString
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public OperandRole[] getOperandRoles()
getOperandRoles
in interface Function
public AtomicSequence atomize() throws XPathException
atomize
in interface Item<Function>
XPathException
- if atomization is not allowed for this kind of itempublic boolean isArray()
public boolean isMap()
public java.lang.String getStringValue()
getStringValue
in interface GroundedValue<Function>
getStringValue
in interface Item<Function>
java.lang.UnsupportedOperationException
- (the string value of a function is not defined)Item.getStringValueCS()
public java.lang.CharSequence getStringValueCS()
getStringValueCS
in interface GroundedValue<Function>
getStringValueCS
in interface Item<Function>
java.lang.UnsupportedOperationException
- (the string value of a function is not defined)Item.getStringValue()
public AnnotationList getAnnotations()
Function
getAnnotations
in interface Function
public boolean effectiveBooleanValue() throws XPathException
effectiveBooleanValue
in interface GroundedValue<Function>
XPathException
- (the EBVof a function item is not defined)public void simplify() throws XPathException
XPathException
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
visitor
- the expression visitor, supplies context informationcontextItemType
- the context item type at the point where the function definition appearsXPathException
- if any failure (e.g. a type checking failure) occurspublic XPathContext makeNewContext(XPathContext callingContext, ContextOriginator originator)
makeNewContext
in interface Function
callingContext
- the XPathContext of the function calling expressionoriginator
- public boolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags) throws XPathException
deepEquals
in interface Function
other
- the other function itemcontext
- the dynamic evaluation contextcomparer
- the object to perform the comparisonflags
- options for how the comparison is performedXPathException
- if the comparison cannot be performedpublic void export(ExpressionPresenter out) throws XPathException
export
in interface Function
XPathException
public boolean isTrustedResultType()
isTrustedResultType
in interface Function
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.