public class FunctionLiteral extends Literal
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD| Constructor and Description |
|---|
FunctionLiteral(FunctionItem 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 |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the FunctionLiteral expression
|
ItemType |
getItemType(TypeHierarchy th)
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,
ExpressionVisitor.ContextItemType contextItemType)
Optimize an expression
|
Expression |
simplify(ExpressionVisitor visitor)
Simplify an expression
|
Expression |
typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
TypeCheck an expression
|
addToPathMap, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, getDependencies, getIntegerBounds, getStreamability, isAtomic, isConstantBoolean, isConstantOne, isEmptySequence, isSubtreeExpression, iterate, iterate, makeEmptySequence, makeLiteral, process, toPattern, toStreamingPattern, toStringadoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getEvaluationMethod, getExecutable, getExpressionName, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamingAdjunct, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, iterateSubExpressionInfo, iterateSubExpressions, markTailFunctionCalls, promote, replaceSubExpression, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeErrorpublic FunctionLiteral(FunctionItem value)
value - the value of this literalpublic FunctionItem getValue()
public Expression simplify(ExpressionVisitor visitor) throws XPathException
simplify in class Literalvisitor - an expression visitorXPathException - if an error is discovered during expression
rewritingpublic Expression typeCheck(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
typeCheck in class Literalvisitor - 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_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public Expression optimize(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
optimize in class Literalvisitor - 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_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public ItemType getItemType(TypeHierarchy th)
getItemType in class Literalth - The TypeHierarchy. Can be null if the target is an AtomicValue.public int computeCardinality()
computeCardinality in class LiteralStaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE,
StaticProperty.ALLOWS_ZERO_OR_MOREpublic int computeSpecialProperties()
StaticProperty.NON_CREATIVE.computeSpecialProperties in class LiteralStaticProperty.NON_CREATIVEpublic boolean isVacuousExpression()
isVacuousExpression in class Literalpublic Expression copy()
public boolean equals(Object obj)
equals in class Literalobj - the other expressionpublic int hashCode()
public ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class Literalpublic void explain(ExpressionPresenter out)
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.