com.saxonica.bytecode
Class ValueOfCompiler
java.lang.Object
com.saxonica.bytecode.ExpressionCompiler
com.saxonica.bytecode.ToIteratorCompiler
com.saxonica.bytecode.ToPushCompiler
com.saxonica.bytecode.SimpleNodeConstructorCompiler
com.saxonica.bytecode.ValueOfCompiler
public class ValueOfCompiler
- extends SimpleNodeConstructorCompiler
Generate code for a ValueOf instruction
Methods inherited from class com.saxonica.bytecode.ExpressionCompiler |
allocateStatic, compileItemFromInt, compileItemFromString, compileToLoop, compileToPrimitive, 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 |
ValueOfCompiler
public ValueOfCompiler()
compileToItem
public void compileToItem(CompilerService compiler,
Expression expression)
throws CannotCompileException
- Generate bytecode to get the ValueOf text from the instruction
Precondition: none.
Postcondition: the stack contains an item from evaluating this instruction
- Overrides:
compileToItem
in class SimpleNodeConstructorCompiler
- Parameters:
compiler
- the compiler serviceexpression
- the expression to be compiled
- Throws:
CannotCompileException
isNoNodeIfEmpty
protected boolean isNoNodeIfEmpty(Expression expr)
- Overridable method to ask whether no node should be produced in the case that the content is empty
- Overrides:
isNoNodeIfEmpty
in class SimpleNodeConstructorCompiler
- Returns:
- true if the rules for this instruction are that when the content is empty, no node is generated
pushNode
protected void pushNode(CompilerService compiler,
Expression expression)
- Generate code to write the node to the current receiver. On entry the stack holds the
current receiver, the node name (for named node kinds only) and the content (for all nodes)
- Specified by:
pushNode
in class SimpleNodeConstructorCompiler
- Parameters:
compiler
- expression
-
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.