| 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.instruct.Instruction
public abstract class Instruction
Abstract superclass for all instructions in the compiled stylesheet.
 This represents a compiled instruction, and as such, the minimum information is
 retained from the original stylesheet. 
 Note: this class implements SourceLocator: that is, it can identify where in the stylesheet
 the source instruction was located.
| Field Summary | 
|---|
| Fields inherited from class net.sf.saxon.expr.Expression | 
|---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD | 
| Constructor Summary | |
|---|---|
Instruction()
Constructor  | 
|
| Method Summary | |
|---|---|
static void | 
appendItem(Item it,
           SequenceReceiver out,
           int locationId)
Static method to append an item that results from evaluating an expression to the current result receiver.  | 
 int | 
computeCardinality()
Get the cardinality of the sequence returned by evaluating this instruction  | 
 int | 
computeSpecialProperties()
Get the static properties of this expression (other than its type).  | 
 boolean | 
createsNewNodes()
Determine whether this instruction creates new nodes.  | 
 String | 
evaluateAsString(XPathContext context)
Evaluate an expression as a String.  | 
 Item | 
evaluateItem(XPathContext context)
Evaluate an expression as a single item.  | 
 int | 
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().  | 
 InstructionInfo | 
getInstructionInfo()
Get InstructionInfo for this expression  | 
 int | 
getInstructionNameCode()
Get the namecode of the instruction for use in diagnostics  | 
 ItemType | 
getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction  | 
 SourceLocator | 
getSourceLocator()
Get a SourceLocator identifying the location of this instruction  | 
 boolean | 
isXSLT()
Establish whether this is an XSLT instruction or an XQuery instruction (used to produce appropriate diagnostics)  | 
 SequenceIterator | 
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.  | 
 void | 
process(XPathContext context)
Process the instruction, without returning any tail calls  | 
abstract  TailCall | 
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.  | 
 Expression | 
promote(PromotionOffer offer)
Offer promotion for this subexpression.  | 
abstract  Expression | 
simplify(StaticContext env)
Simplify an expression.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface javax.xml.transform.SourceLocator | 
|---|
getColumnNumber, getLineNumber, getPublicId, getSystemId | 
| Constructor Detail | 
|---|
public Instruction()
| Method Detail | 
|---|
public int getImplementationMethod()
getImplementationMethod in class Expressionpublic int getInstructionNameCode()
public ItemType getItemType(TypeHierarchy th)
getItemType in class Expressionth - 
public int computeCardinality()
public abstract TailCall processLeavingTail(XPathContext context)
                                     throws XPathException
processLeavingTail in interface TailCallReturnercontext - The dynamic context of the transformation, giving access to the current node,
 the current variables, etc.
XPathException
public void process(XPathContext context)
             throws XPathException
process in class Expressioncontext - The dynamic context, giving access to the current node,
 the current variables, etc.
XPathExceptionpublic SourceLocator getSourceLocator()
public abstract Expression simplify(StaticContext env)
                             throws XPathException
simplify in class ExpressionXPathException - if an error is discovered during expression
     rewritingpublic int computeSpecialProperties()
computeSpecialProperties in class Expressionpublic boolean createsNewNodes()
public Expression promote(PromotionOffer offer)
                   throws XPathException
promote in class Expressionoffer - 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
XPathException - if any error is detected
public Item evaluateItem(XPathContext context)
                  throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
     expression
public SequenceIterator iterate(XPathContext context)
                         throws XPathException
iterate in interface SequenceIterableiterate in class Expressioncontext - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
     expression
public final String evaluateAsString(XPathContext context)
                              throws XPathException
evaluateAsString in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
     expression
ClassCastException - if the result type of the
     expression is not xs:string?public InstructionInfo getInstructionInfo()
Expression
getInstructionInfo in interface InstructionInfoProvidergetInstructionInfo in class Expression
public static void appendItem(Item it,
                              SequenceReceiver out,
                              int locationId)
                       throws XPathException
it - the item: possibly a FunctionCallPackageout - the Receiver
XPathExceptionpublic boolean isXSLT()
  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||