| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.TraceWrapper
All known Subclasses: net.sf.saxon.instruct.TraceInstruction, net.sf.saxon.instruct.TraceExpression,
TraceWrapper | public class TraceWrapper extends Instruction (Code) | | This class is a tracing wrapper around any expression: it delivers the same result as the
wrapped expression, but traces its evaluation to a TraceListener
|
computeDependencies | public int computeDependencies()(Code) | | Get the static properties of this expression (other than its type). The result is
bit-signficant. These properties are used for optimizations. In general, if
property bit is set, it is true, but if it is unset, the value is unknown.
a set of flags indicating static properties of this expression |
createsNewNodes | final public boolean createsNewNodes()(Code) | | Determine whether this instruction creates new nodes.
|
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: out - |
evaluateItem | public Item evaluateItem(XPathContext context) throws XPathException(Code) | | Evaluate an expression as a single item. This always returns either a single Item or
null (denoting the empty sequence). No conversion is done. This method should not be
used unless the static type of the expression is a subtype of "item" or "item?": that is,
it should not be called if the expression may return a sequence. There is no guarantee that
this condition will be detected.
Parameters: context - The context in which the expression is to be evaluated exception: net.sf.saxon.trans.XPathException - if any dynamic error occurs evaluating theexpression the node or atomic value that results from evaluating theexpression; or null to indicate that the result is an emptysequence |
getCardinality | public int getCardinality()(Code) | | Determine the static cardinality of the expression. This establishes how many items
there will be in the result of the expression, at compile time (i.e., without
actually evaluating the result.
one of the values Cardinality.ONE_OR_MORE,Cardinality.ZERO_OR_MORE, Cardinality.EXACTLY_ONE,Cardinality.ZERO_OR_ONE, Cardinality.EMPTY. This defaultimplementation returns ZERO_OR_MORE (which effectively gives noinformation). |
getDependencies | public int getDependencies()(Code) | | Determine which aspects of the context the expression depends on. The result is
a bitwise-or'ed value composed from constants such as
net.sf.saxon.expr.StaticProperty.DEPENDS_ON_CONTEXT_ITEM and
net.sf.saxon.expr.StaticProperty.DEPENDS_ON_CURRENT_ITEM . The default implementation combines the intrinsic
dependencies of this expression with the dependencies of the subexpressions,
computed recursively. This is overridden for expressions such as FilterExpression
where a subexpression's dependencies are not necessarily inherited by the parent
expression.
a set of bit-significant flags identifying the dependencies ofthe expression |
getInstructionNameCode | public int getInstructionNameCode()(Code) | | |
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Get the item type of the items returned by evaluating this instruction
the static item type of the instruction Parameters: th - |
iterate | public SequenceIterator iterate(XPathContext context) throws XPathException(Code) | | Return an Iterator to iterate over the values of a sequence. The value of every
expression can be regarded as a sequence, so this method is supported for all
expressions. This default implementation handles iteration for expressions that
return singleton values: for non-singleton expressions, the subclass must
provide its own implementation.
exception: net.sf.saxon.trans.XPathException - if any dynamic error occurs evaluating theexpression Parameters: context - supplies the context for evaluation a SequenceIterator that can be used to iterate over the resultof the expression |
processLeavingTail | public TailCall processLeavingTail(XPathContext context) throws XPathException(Code) | | Execute this instruction, with the possibility of returning tail calls if there are any.
This outputs the trace information via the registered TraceListener,
and invokes the instruction being traced.
Parameters: context - the dynamic execution context either null, or a tail call that the caller must invoke on return throws: net.sf.saxon.trans.XPathException - |
promote | public Expression promote(PromotionOffer offer) throws XPathException(Code) | | Offer promotion for this subexpression. The offer will be accepted if the subexpression
is not dependent on the factors (e.g. the context item) identified in the PromotionOffer.
This method is always called at compile time.
Parameters: offer - details of the offer, for example the offer to moveexpressions that don't depend on the context to an outer level inthe containing expression if the offer is not accepted, return this expression unchanged.Otherwise return the result of rewriting the expression to promotethis subexpression throws: net.sf.saxon.trans.XPathException - if any error is detected |
|
|