|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.bytecode.ExpressionCompiler com.saxonica.bytecode.LiteralCompiler
public class LiteralCompiler
Generate byte code for a literal expression in the expression tree
Constructor Summary | |
---|---|
LiteralCompiler()
|
Method Summary | |
---|---|
void |
compileToBoolean(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as a boolean Precondition: none. |
void |
compileToItem(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as an Item Precondition: none. |
void |
compileToIterator(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as a SequenceIterator
Precondition: none. |
void |
compileToPrimitive(CompilerService compiler,
Expression expression,
Class requiredClass,
OnEmpty onEmpty)
Generate bytecode to evaluate the expression leaving a plain Java value on the stack. |
void |
compileToPush(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression in push mode Precondition: none. |
Methods inherited from class com.saxonica.bytecode.ExpressionCompiler |
---|
allocateStatic, compileItemFromInt, compileItemFromString, compileToLoop, generateMethod, getConfiguration, handleEmptyStringResult, setConfiguration, throwXPathException, throwXPathException, unboxItem, verify, visitAnnotation, visitLineNumber |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LiteralCompiler()
Method Detail |
---|
public void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToItem
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiled
CannotCompileException
public void compileToPrimitive(CompilerService compiler, Expression expression, Class requiredClass, OnEmpty onEmpty) throws CannotCompileException
compileToPrimitive
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledrequiredClass
- the class of the Java value that is to be left on the stack if the generated code
exits normally. This must be one of Integer.TYPE, Double.TYPE, Float.TYPE, BigDecimal.class, CharSequence.class.onEmpty
- action to be performed if the value of the expression is an empty sequence
CannotCompileException
public void compileToIterator(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
SequenceIterator
Precondition: none.
Postcondition: at execution time, the stack contains a SequenceIterator representing the result of the expression
compileToIterator
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiled
CannotCompileException
public void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToBoolean
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiled
CannotCompileException
public void compileToPush(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToPush
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiled
CannotCompileException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |