public class FunctionLiteral extends Literal
UserFunctionReference
is used.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 |
---|
FunctionLiteral(Function value)
Create a literal as a wrapper around a Value
|
Modifier and Type | Method and Description |
---|---|
int |
computeCardinality()
Determine the cardinality
|
int |
computeHashCode()
Return a hash code to support the equals() function
|
int |
computeSpecialProperties()
Compute the static properties of this expression (other than its type).
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
boolean |
equals(java.lang.Object obj)
Determine whether two literals are equal, when considered as expressions.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
FunctionItemType |
getItemType()
Determine the data type of the items in the expression, if possible
|
Function |
getValue()
Get the value represented by this Literal
|
boolean |
isVacuousExpression()
Determine whether this is a vacuous expression as defined in the XQuery update specification
|
void |
setRetainedStaticContext(RetainedStaticContext rsc)
Set the retained static context
|
Expression |
simplify()
Simplify an expression
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
TypeCheck an expression
|
addToPathMap, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, exportAtomicValue, exportValue, getDependencies, getImplementationMethod, getIntegerBounds, getNetCost, getStaticUType, getStreamerName, hasEffectiveBooleanValue, isAtomic, isConstantBoolean, isConstantOne, isEmptySequence, isSubtreeExpression, iterate, iterate, makeEmptySequence, makeLiteral, makeLiteral, makeStringsLiteral, optimize, process, toPattern, toShortString, toString
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, explain, getCardinality, getConfiguration, getConstructType, getCost, getEvaluationMethod, getExtraProperty, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isUpdatingExpression, markTailFunctionCalls, operandList, operands, operandSparseList, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public FunctionLiteral(Function value)
value
- the value of this literalpublic Function getValue()
public Expression simplify() throws XPathException
simplify
in class Expression
XPathException
- if an error is discovered during expression
rewritingpublic Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck
in class Literal
visitor
- an expression visitorcontextInfo
- Information available statically about the context item: whether it is (possibly)
absent; its static type; its streaming posture.XPathException
- if an error is discovered during this phase
(typically a type error)public FunctionItemType getItemType()
getItemType
in class Literal
public int computeCardinality()
computeCardinality
in class Literal
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public int computeSpecialProperties()
StaticProperty.NON_CREATIVE
.computeSpecialProperties
in class Literal
StaticProperty.NON_CREATIVE
public boolean isVacuousExpression()
isVacuousExpression
in class Literal
public Expression copy(RebindingMap rebindings)
public void setRetainedStaticContext(RetainedStaticContext rsc)
setRetainedStaticContext
in class Expression
rsc
- the static context to be retainedpublic boolean equals(java.lang.Object obj)
equals
in class Literal
obj
- the other expressionpublic int computeHashCode()
computeHashCode
in class Literal
public java.lang.String getExpressionName()
getExpressionName
in class Literal
public void export(ExpressionPresenter out) throws XPathException
export
in interface ExportAgent
export
in class Literal
out
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.