public class LiteralCompiler extends ExpressionCompiler
| Constructor and Description |
|---|
LiteralCompiler() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
allocateStatic, compileItemFromInt, compileToLoop, generateMethod, handleEmptyStringResult, printStackTop, unboxItem, verify, visitAnnotation, visitLineNumberpublic void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompilercompileToItem in class ExpressionCompilercompiler - the compiler serviceexpression - the expression to be compiledCannotCompileExceptionpublic void compileToPrimitive(CompilerService compiler, Expression expression, Class requiredClass, OnEmpty onEmpty) throws CannotCompileException
compileToPrimitive in class ExpressionCompilercompiler - 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 sequenceCannotCompileExceptionpublic void compileToIterator(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompilerSequenceIterator
Precondition: none.
Postcondition: at execution time, the stack contains a SequenceIterator representing the result of the expressioncompileToIterator in class ExpressionCompilercompiler - the compiler serviceexpression - the expression to be compiledCannotCompileExceptionpublic void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompilercompileToBoolean in class ExpressionCompilercompiler - the compiler serviceexpression - the expression to be compiledCannotCompileExceptionpublic void compileToPush(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompilercompileToPush in class ExpressionCompilercompiler - the compiler serviceexpression - the expression to be compiledCannotCompileExceptionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.