public static class OnEmpty.UnwindAndJump extends OnEmpty
OnEmpty.ReturnEmptyString, OnEmpty.ReturnNull, OnEmpty.UnwindAndJump
RETURN_EMPTY_STRING, RETURN_NULL
Constructor and Description |
---|
OnEmpty.UnwindAndJump(LabelInfo label)
Generate an UnwindAndStack action using an empty stack (no unwinding needed)
|
OnEmpty.UnwindAndJump(Stack<Class> unwindStack,
LabelInfo label) |
public OnEmpty.UnwindAndJump(Stack<Class> unwindStack, LabelInfo label)
unwindStack
- Information about the classes of object that will be on the bytecode stack and must be
popped off the stack before jumping to the onEmpty label: the generated code must pop the items described
on this stack before jumping to the label.label
- a label to which control will be transferred (with nothing on the stack) if the result of the
evaluation is an empty sequence. This mechanism supports the design pattern whereby many expressions return
empty if one of there arguments is empty; rather than repeatedly checking for empty after evaluating each
subexpression, there is a "longjump" treating this as an exception case.public OnEmpty.UnwindAndJump(LabelInfo label)
label
- the label to jump topublic void generate(Generator ga)
public LabelInfo getLabel()
public Stack<Class> getUnwindStack()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.