Class BranchTarget

java.lang.Object
org.jibx.binding.classes.BranchTarget

public class BranchTarget extends Object
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 Details

    • m_targetHandle

      private final InstructionHandle m_targetHandle
      Actual wrapped instruction handle.
    • m_stackTypes

      private final String[] m_stackTypes
      Stack state for branch target.
  • Constructor Details

    • BranchTarget

      BranchTarget(InstructionHandle hand, String[] types)
      Constructor.
      Parameters:
      hand - instruction handle
      types - 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

      boolean matchStacks(String[] types)
      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