public class FunctionLiteral extends Literal
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD
Constructor and Description |
---|
FunctionLiteral(FunctionItem value,
Container container)
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 |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the FunctionLiteral expression
|
ItemType |
getItemType()
Determine the data type of the items in the expression, if possible
|
FunctionItem |
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
|
Expression |
simplify(ExpressionVisitor visitor)
Simplify an expression
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
TypeCheck an expression
|
addToPathMap, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, getDependencies, getIntegerBounds, getStreamingAdjunct, isAtomic, isConstantBoolean, isConstantOne, isEmptySequence, isSubtreeExpression, iterate, iterate, makeEmptySequence, makeLiteral, process, toPattern, toShortString, toString
adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, explain, getCardinality, getColumnNumber, getConfiguration, getConstructType, getContainer, getEvaluationMethod, getExpressionName, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLocationId, getObjectName, getPosture, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isIdentical, isUpdatingExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operands, promote, replaceOperand, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, setPostureAndSweep, staticTypeCheck, suppressValidation, toStreamingPattern, typeError, unordered
public FunctionLiteral(FunctionItem value, Container container)
value
- the value of this literalcontainer
- the container for the literal in the expression treepublic FunctionItem getValue()
public Expression simplify(ExpressionVisitor visitor) throws XPathException
simplify
in class Expression
visitor
- an expression visitorXPathException
- 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 ItemType 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 boolean equals(Object obj)
equals
in class Literal
obj
- the other expressionpublic int hashCode()
public ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Literal
public void explain(ExpressionPresenter out)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.