Package org.jibx.binding.classes
Class BranchWrapper
- java.lang.Object
-
- org.jibx.binding.classes.BranchWrapper
-
public class BranchWrapper extends Object
Wrapper for branch handle. This preserves a snapshot of the stack state for the branch instruction, matching it against the stack state for the target instruction when set.- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidsetErrorOverride(boolean over)Set target setting error override state.voidsetTarget(BranchTarget target, MethodBuilder mb)Set target instruction for branch.static voidsetTracking(boolean track)Set branch code generation tracking state.
-
-
-
Method Detail
-
setTarget
public void setTarget(BranchTarget target, MethodBuilder mb)
Set target instruction for branch. Validates the branch source stack state against the branch target stack state.- Parameters:
target- branch target wrappermb- method builder using this code
-
setTracking
public static void setTracking(boolean track)
Set branch code generation tracking state. When set, this saves a stack trace for each generated branch instruction, allowing the source of a branch to be traced when an error occurs in setting the branch target.- Parameters:
track-trueto enable branch code generation tracking,falseto disable it
-
setErrorOverride
public static void setErrorOverride(boolean over)
Set target setting error override state. When set, this blocks throwing an exception when an error occurs on setting the branch target, instead just printing the information to the console.- Parameters:
over-trueto override exception on target error,falseto allow it
-
-