Package com.saxonica.ee.bytecode.util
Class OnEmpty
- java.lang.Object
-
- com.saxonica.ee.bytecode.util.OnEmpty
-
- Direct Known Subclasses:
OnEmpty.ReturnEmptyString,OnEmpty.ReturnNull,OnEmpty.UnwindAndJump
public abstract class OnEmpty extends java.lang.ObjectThe 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 Description static classOnEmpty.ReturnEmptyStringThe ReturnNull subclass indicates that when an expression evaluates to the empty sequence, the value should be returned as a zero-length string.static classOnEmpty.ReturnNullThe ReturnNull subclass indicates that when an expression evaluates to the empty sequence, the value should be returned as a Java null.static classOnEmpty.UnwindAndJumpThe 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 Description static OnEmptyRETURN_EMPTY_STRINGstatic OnEmptyRETURN_NULL
-
Constructor Summary
Constructors Constructor Description OnEmpty()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidgenerate(Generator ga)
-