|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.saxonica.codegen.ExpressionCompiler
com.saxonica.codegen.SingletonExpressionCompiler
com.saxonica.codegen.TreatFnCompiler
public class TreatFnCompiler
Generate Java code to implement the "treat as" functions exactly-one, etc. These functions essentially do nothing other than returning their operands; the work is all done in checking that the arguments are consistent with the function signature.
Constructor Summary | |
---|---|
TreatFnCompiler()
|
Method Summary | |
---|---|
void |
compileAsLoop(CompilerService compiler,
Expression expr,
LoopAction action)
Compile an expression in the form of a loop. |
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 |
String |
compileToItem(CompilerService compiler,
Expression expr)
Generate Java code to evaluate the expression as an Item |
String |
compileToIterator(CompilerService compiler,
Expression exp)
Generate Java code to evaluate the expression as a SequenceIterator |
String |
compileToValueRepresentation(CompilerService compiler,
Expression expr)
Generate Java code to evaluate the expression as a ValueRepresentation |
Methods inherited from class com.saxonica.codegen.SingletonExpressionCompiler |
---|
compileToCharSequence, compileToEffectiveBooleanValue |
Methods inherited from class com.saxonica.codegen.ExpressionCompiler |
---|
compileAsLoopWithContext |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreatFnCompiler()
Method Detail |
---|
public String compileToItem(CompilerService compiler, Expression expr)
ExpressionCompiler
compileToItem
in class ExpressionCompiler
compiler
- the compiler serviceexpr
- 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 void compilePush(CompilerService compiler, Expression exp)
ExpressionCompiler
compilePush
in class SingletonExpressionCompiler
compiler
- the compiler serviceexp
- the expression to be compiledpublic String compileToIterator(CompilerService compiler, Expression exp)
ExpressionCompiler
compileToIterator
in class SingletonExpressionCompiler
compiler
- the compiler serviceexp
- the expression to be compiled
SequenceIterator
,
and which at run-time will hold an iterator over the the value of the expressionpublic void compileAsLoop(CompilerService compiler, Expression expr, LoopAction action)
ExpressionCompiler
compileAsLoop
in class ExpressionCompiler
compiler
- the CompilerServiceexpr
- the expression to be compiledaction
- the action to be taken to compile code that processes each item in the
sequence returned by the expressionpublic String compileToValueRepresentation(CompilerService compiler, Expression expr)
ExpressionCompiler
compileToValueRepresentation
in class ExpressionCompiler
compiler
- the compiler serviceexpr
- the expression to be compiled
ValueRepresentation
,
and which at run-time will hold the value of the expression
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |