net.sf.saxon.expr
Class TypeExpression

java.lang.Object
  extended bynet.sf.saxon.expr.ComputedExpression
      extended bynet.sf.saxon.expr.TypeExpression
All Implemented Interfaces:
Expression, Serializable

public abstract class TypeExpression
extends ComputedExpression

TypeExpression: superclass for expressions involving a source expression and a type

See Also:
Serialized Form

Field Summary
protected  Expression source
           
protected  SequenceType target
           
 
Fields inherited from class net.sf.saxon.expr.ComputedExpression
lineNumber, NO_ARGUMENTS, staticProperties
 
Constructor Summary
protected TypeExpression()
           
 
Method Summary
 int computeCardinality()
          Determine the static cardinality
 Expression[] getSubExpressions()
          Get the immediate subexpressions of this expression
 SequenceType getTargetType()
           
 Expression promote(PromotionOffer offer)
          Promote this expression if possible
 
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
 
Methods inherited from interface net.sf.saxon.expr.Expression
analyze, display, getItemType
 

Field Detail

source

protected Expression source

target

protected SequenceType target
Constructor Detail

TypeExpression

protected TypeExpression()
Method Detail

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