public class ErrorExpressionCompiler extends ExpressionCompiler
Constructor and Description |
---|
ErrorExpressionCompiler() |
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,
java.lang.Class requiredClass,
OnEmpty onEmpty)
Generate bytecode to evaluate the expression as a String or other CharSequence.
|
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, visitLineNumber
public void compileToItem(CompilerService compiler, Expression expression) throws CannotCompileException
compileToItem
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToIterator(CompilerService compiler, Expression expression) throws CannotCompileException
SequenceIterator
Precondition: none.
Postcondition: at execution time, the stack contains a SequenceIterator representing the result of the expressioncompileToIterator
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
compileToBoolean
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToPush(CompilerService compiler, Expression expression) throws CannotCompileException
compileToPush
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
public void compileToPrimitive(CompilerService compiler, Expression expression, java.lang.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
- defines the action to be taken if the expression evaluates to the empty sequence.
May be null if the expression is known statically not to evaluate to an empty sequence. If the return
class is a primitive type (double, float, etc) this must be an instance of OnEmpty.UnwindAndJump
CannotCompileException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.