| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.saxonica.codegen.ExpressionCompiler
public abstract class ExpressionCompiler
This abstract class represents the compiler (that is, Java code generator)
 for a particular kind of expression on the expression tree. The expression compiler
 is called by the CompilerService working its way down the expression tree in a top
 down fashion: there is a one-to-one correspondence between the classes implementing the
 expression on the expression tree and the compiler object used to generate Java code fragments.
 Various methods are supplied to compile expressions; exactly one of them is called, depending
 on the context in which the expression appears.
| Constructor Summary | |
|---|---|
| ExpressionCompiler() | |
| Method Summary | |
|---|---|
|  void | compileAsLoop(CompilerService compiler,
              Expression expr,
              LoopAction action)Compile an XPath expression in the form of a loop. | 
| abstract  void | compilePush(CompilerService compiler,
            Expression exp)Generate Java code to execute the expression in push mode, that is, code to write events to the current output Receiver | 
| abstract  java.lang.String | compileToCharSequence(CompilerService compiler,
                      Expression expr)Generate Java code to evaluate the expression as a CharSequence | 
| abstract  java.lang.String | compileToEffectiveBooleanValue(CompilerService compiler,
                               Expression expr,
                               ReturnAction options)Generate Java code to evaluate the effective boolean value of the expression | 
| abstract  java.lang.String | compileToItem(CompilerService compiler,
              Expression exp)Generate Java code to evaluate the expression as an Item | 
| abstract  java.lang.String | compileToIterator(CompilerService compiler,
                  Expression exp)Generate Java code to evaluate the expression as a SequenceIterator | 
|  java.lang.String | compileToValueRepresentation(CompilerService compiler,
                             Expression expr)Generate Java code to evaluate the expression as a ValueRepresentation | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ExpressionCompiler()
| Method Detail | 
|---|
public abstract void compilePush(CompilerService compiler,
                                 Expression exp)
compiler - the compiler serviceexp - the expression to be compiled
public abstract java.lang.String compileToItem(CompilerService compiler,
                                               Expression exp)
compiler - the compiler serviceexp - the expression to be compiled
Item,
 and which will hold the value of the expression at run-time (or hold null,
 representing an empty sequence).
public abstract java.lang.String compileToIterator(CompilerService compiler,
                                                   Expression exp)
compiler - the compiler serviceexp - the XPath expression to be compiled
SequenceIterator,
 and which at run-time will hold an iterator over the the value of the XPath expression
public abstract java.lang.String compileToEffectiveBooleanValue(CompilerService compiler,
                                                                Expression expr,
                                                                ReturnAction options)
compiler - the compiler serviceexpr - the XPath expression to be compiledoptions - indicates how the boolean result is to be returned
public abstract java.lang.String compileToCharSequence(CompilerService compiler,
                                                       Expression expr)
compiler - the compiler serviceexpr - the XPath expression to be compiled
CharSequence,
 and which will hold the string value of the XPath expression at run-time
public java.lang.String compileToValueRepresentation(CompilerService compiler,
                                                     Expression expr)
compiler - the compiler serviceexpr - the expression to be compiled
ValueRepresentation,
 and which at run-time will hold the value of the expression
public void compileAsLoop(CompilerService compiler,
                          Expression expr,
                          LoopAction action)
compiler - the CompilerServiceexpr - the XPath expression to be compiledaction - the action to be taken to compile code that processes each item in the
 sequence returned by the XPath expression| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||