com.saxonica.bytecode.util

## Class OnEmpty

- java.lang.Object
- - com.saxonica.bytecode.util.OnEmpty

- Direct Known Subclasses:
    OnEmpty.ReturnEmptyString, OnEmpty.ReturnNull, OnEmpty.UnwindAndJump

      public abstract class OnEmpty
      extends Object

  The OnEmpty class represents an action to be taken by the bytecode generator when compiling an expression to return a "primitive" (unboxed) value such as a double float int long or String (treated as primitive for this purpose). There are a number of defined subclasses and these are known to users of the class; it is not possible to introduce new subclasses without careful examination of existing code.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OnEmpty.ReturnEmptyString` The ReturnNull subclass indicates that when an expression evaluates to the empty sequence, the value should be returned as a zero-length string.
    `static class` | `OnEmpty.ReturnNull` The ReturnNull subclass indicates that when an expression evaluates to the empty sequence, the value should be returned as a Java null.
    `static class` | `OnEmpty.UnwindAndJump` The UnwindAndJump subclass causes the code generator, when an expression evaluates to the empty sequence, to generate a "goto" instruction to a defined label; but before executing the jump, the stack will be unwound to a known position.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OnEmpty` | `RETURN_EMPTY_STRING`
    `static OnEmpty` | `RETURN_NULL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OnEmpty()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `generate(Generator ga)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### RETURN_EMPTY_STRING

          public static final OnEmpty RETURN_EMPTY_STRING

    - #### RETURN_NULL

          public static final OnEmpty RETURN_NULL

  - ### Constructor Detail

    - #### OnEmpty

          public OnEmpty()

  - ### Method Detail

    - #### generate

          public abstract void generate(Generator ga)

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