|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.Expression
com.saxonica.functions.hof.FunctionItemExpression
public class FunctionItemExpression
A FunctionItemExpression is a wrapper around a FunctionItem; it is an expression, whose value is the function item that it wraps.
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.expr.Expression |
|---|
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD |
| Constructor Summary | |
|---|---|
FunctionItemExpression(AbstractFunctionItem value)
Create a literal as a wrapper around a Value |
|
| Method Summary | |
|---|---|
PathMap.PathMapNodeSet |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap. |
int |
computeCardinality()
Determine the cardinality |
int |
computeSpecialProperties()
Compute the static properties of this expression (other than its type). |
Expression |
copy()
Copy an expression. |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression. |
boolean |
equals(Object obj)
Determine whether two literals are equal, when considered as expressions. |
CharSequence |
evaluateAsString(XPathContext context)
Evaluate an expression as a String. |
Item |
evaluateItem(XPathContext context)
Evaluate as a singleton item (or empty sequence). |
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int |
getDependencies()
Determine which aspects of the context the expression depends on. |
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 |
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Expression |
optimize(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Optimize an expression |
void |
process(XPathContext context)
Process the value as an instruction, without returning any tail calls |
Expression |
simplify(ExpressionVisitor visitor)
Simplify an expression |
String |
toString()
The toString() method for an expression attempts to give a representation of the expression in an XPath-like form, but there is no guarantee that the syntax will actually be true XPath. |
Expression |
typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
TypeCheck an expression |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FunctionItemExpression(AbstractFunctionItem value)
value - the value of this literal| Method Detail |
|---|
public FunctionItem getValue()
public Expression simplify(ExpressionVisitor visitor)
throws XPathException
simplify in class Expressionvisitor - an expression visitor
XPathException - if an error is discovered during expression
rewriting
public Expression typeCheck(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
throws XPathException
typeCheck in class Expressionvisitor - 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 final Expression optimize(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
throws XPathException
optimize in class Expressionvisitor - 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(TypeHierarchy th)
getItemType in class Expressionth - The TypeHierarchy. Can be null if the target is an AtomicValue.
public int computeCardinality()
computeCardinality in class ExpressionStaticProperty.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 ExpressionStaticProperty.NON_CREATIVEpublic boolean isVacuousExpression()
isVacuousExpression in class Expressionpublic Expression copy()
copy in class Expression
public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
addToPathMap in class ExpressionpathMap - the PathMap to which the expression should be addedpathMapNodeSet -
public final int getDependencies()
getDependencies in class Expression
public SequenceIterator iterate(XPathContext context)
throws XPathException
iterate in class Expressioncontext - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
public Item evaluateItem(XPathContext context)
throws XPathException
evaluateItem in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expression
public void process(XPathContext context)
throws XPathException
process in class Expressioncontext - The dynamic context, giving access to the current node,
the current variables, etc.
XPathException - if a dynamic error occurs
public CharSequence evaluateAsString(XPathContext context)
throws XPathException
Expression
evaluateAsString in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expression
public boolean effectiveBooleanValue(XPathContext context)
throws XPathException
effectiveBooleanValue in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expressionpublic boolean equals(Object obj)
equals in class Objectobj - the other expression
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Expressionpublic void explain(ExpressionPresenter out)
explain in class Expressionout - the expression presenter used to display the structure
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||