Package org.jibx.binding.classes
Class BranchTarget
java.lang.Object
org.jibx.binding.classes.BranchTarget
Wrapper for branch target information. This preserves a snapshot of the stack
state for the branch target, allowing it to be matched against the stack
state for the branch source.
- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]
Stack state for branch target.private final InstructionHandle
Actual wrapped instruction handle. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) InstructionHandle
Get actual target instruction.(package private) String[]
getStack()
Get stack state information.(package private) boolean
matchStacks
(String[] types) Matches the branch target stack state against the supplied stack state.
-
Field Details
-
m_targetHandle
private final InstructionHandle m_targetHandleActual wrapped instruction handle. -
m_stackTypes
Stack state for branch target.
-
-
Constructor Details
-
BranchTarget
BranchTarget(InstructionHandle hand, String[] types) Constructor.- Parameters:
hand
- instruction handletypes
- array of types of values on stack
-
-
Method Details
-
getInstruction
InstructionHandle getInstruction()Get actual target instruction.- Returns:
- handle for target instruction
-
getStack
String[] getStack()Get stack state information.- Returns:
- array of type names on stack
-
matchStacks
Matches the branch target stack state against the supplied stack state.- Parameters:
types
- array of types of values on stack- Returns:
true
if stack states match,false
if not
-