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 |
computeSpecialProperties()
Compute the static properties of this expression (other than its type).
|
Expression |
copy()
Copy an expression.
|
boolean |
equals(Object obj)
Determine whether two literals are equal, when considered as expressions.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the FunctionLiteral expression
|
FunctionItemType |
getItemType()
Determine the data type of the items in the expression, if possible
|
Function |
getValue()
Get the value represented by this Literal
|
int |
hashCode()
Return a hash code to support the equals() function
|
boolean |
isVacuousExpression()
Determine whether this is a vacuous expression as defined in the XQuery update specification
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Optimize an expression
|
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, getCost, getDependencies, getImplementationMethod, getIntegerBounds, getStreamingAdjunct, isAtomic, isConstantBoolean, isConstantOne, isEmptySequence, isSubtreeExpression, iterate, iterate, makeEmptySequence, makeLiteral, makeStringsLiteral, process, promote, toPattern, toShortString, toString
adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, explain, getCardinality, getConfiguration, getConstructType, getEvaluationMethod, getExpressionName, getHostLanguage, getIntrinsicDependencies, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isUpdatingExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operands, operandSparseList, optimizeChildren, optimizeForType, promoteChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContextLocally, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, toStreamingPattern, typeCheckChildren, typeError, unordered
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 Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
optimize
in class Literal
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
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()
public void setRetainedStaticContext(RetainedStaticContext rsc)
setRetainedStaticContext
in class Expression
rsc
- the static context to be retainedpublic boolean equals(Object obj)
equals
in class Literal
obj
- the other expressionpublic int hashCode()
public ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Literal
public void export(ExpressionPresenter out)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.