Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`ValueOfCompiler()`

Method Summary
`void` | `compileToItem(CompilerService compiler, Expression expression)` Generate bytecode to get the ValueOf text from the instruction Precondition: none.
`protected boolean` | `isNoNodeIfEmpty(Expression expr)` Overridable method to ask whether no node should be produced in the case that the content is empty
`protected void` | `pushNode(CompilerService compiler, Expression expression)` Generate code to write the node to the current receiver.

Methods inherited from class com.saxonica.bytecode.SimpleNodeConstructorCompiler
`checkContent, compileNodeName, compileToPush, isNamedNodeKind`

Methods inherited from class com.saxonica.bytecode.ToPushCompiler
`compileToIterator`

Methods inherited from class com.saxonica.bytecode.ToIteratorCompiler
`compileToBoolean`

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`

Constructor Detail

### ValueOfCompiler

    public ValueOfCompiler()

Method Detail

### 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 service
    `expression` - 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` -

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.