net.sf.saxon.expr
Class TypeExpression
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.expr.TypeExpression
- All Implemented Interfaces:
- Expression, java.io.Serializable
- public abstract class TypeExpression
- extends ComputedExpression
TypeExpression: superclass for expressions involving a source expression and a type
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getDependencies, getIntrinsicDependencies, getLineNumber, getSpecialProperties, iterate, markTailFunctionCalls, setLineNumber, simplify, typeError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
protected Expression source
target
protected SequenceType target
TypeExpression
protected TypeExpression()
getTargetType
public final SequenceType getTargetType()
promote
public Expression promote(PromotionOffer offer)
throws XPathException
- Promote this expression if possible
- Specified by:
promote
in interface Expression
- Overrides:
promote
in class ComputedExpression
- Parameters:
offer
- details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expression
- Returns:
- if the offer is not accepted, return this expression unchanged.
Otherwise return the result of rewriting the expression to promote
this subexpression
- Throws:
XPathException
- if any error is detected
getSubExpressions
public Expression[] getSubExpressions()
- Get the immediate subexpressions of this expression
- Specified by:
getSubExpressions
in interface Expression
- Overrides:
getSubExpressions
in class ComputedExpression
- Returns:
- an array containing the sub-expressions of this expression
computeCardinality
public int computeCardinality()
- Determine the static cardinality
- Specified by:
computeCardinality
in class ComputedExpression