org.jibx.binding.classes
Class BranchTarget

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

public class BranchTarget
extends java.lang.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 Summary
private  java.lang.String[] m_stackTypes
          Stack state for branch target.
private  org.apache.bcel.generic.InstructionHandle m_targetHandle
          Actual wrapped instruction handle.
 
Constructor Summary
BranchTarget(org.apache.bcel.generic.InstructionHandle hand, java.lang.String[] types)
          Constructor.
 
Method Summary
(package private)  org.apache.bcel.generic.InstructionHandle getInstruction()
          Get actual target instruction.
(package private)  java.lang.String[] getStack()
          Get stack state information.
(package private)  boolean matchStacks(java.lang.String[] types)
          Matches the branch target stack state against the supplied stack state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_targetHandle

private final org.apache.bcel.generic.InstructionHandle m_targetHandle
Actual wrapped instruction handle.


m_stackTypes

private final java.lang.String[] m_stackTypes
Stack state for branch target.

Constructor Detail

BranchTarget

BranchTarget(org.apache.bcel.generic.InstructionHandle hand,
             java.lang.String[] types)
Constructor.

Parameters:
hand - instruction handle
types - array of types of values on stack
Method Detail

getInstruction

org.apache.bcel.generic.InstructionHandle getInstruction()
Get actual target instruction.

Returns:
handle for target instruction

getStack

java.lang.String[] getStack()
Get stack state information.

Returns:
array of type names on stack

matchStacks

boolean matchStacks(java.lang.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


Project Web Site