Class InducedCFG.BasicBlock

java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
com.ibm.wala.cfg.InducedCFG.BasicBlock
All Implemented Interfaces:
IBasicBlock<SSAInstruction>, INodeWithNumber, Iterable<SSAInstruction>
Enclosing class:
InducedCFG

public class InducedCFG.BasicBlock extends NodeWithNumber implements IBasicBlock<SSAInstruction>
  • Method Details

    • getPhis

      public Collection<SSAPhiInstruction> getPhis()
    • addPhi

      public void addPhi(SSAPhiInstruction phiInstruction)
    • getPis

      public Collection<SSAPiInstruction> getPis()
    • addPi

      public void addPi(SSAPiInstruction piInstruction)
    • equals

      public boolean equals(Object arg0)
      Overrides:
      equals in class Object
    • getFirstInstructionIndex

      public int getFirstInstructionIndex()
      Description copied from interface: IBasicBlock
      Get the index of the first instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method.

      If the result is < 0, the block has no instructions

      Specified by:
      getFirstInstructionIndex in interface IBasicBlock<SSAInstruction>
      Returns:
      the instruction index for the first instruction in the basic block.
    • getLastInstructionIndex

      public int getLastInstructionIndex()
      Description copied from interface: IBasicBlock
      Get the index of the last instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method.

      If the result is < 0, the block has no instructions

      Specified by:
      getLastInstructionIndex in interface IBasicBlock<SSAInstruction>
      Returns:
      the instruction index for the last instruction in the basic block
    • isCatchBlock

      public boolean isCatchBlock()
      Description copied from interface: IBasicBlock
      Return true if the basic block represents a catch block.
      Specified by:
      isCatchBlock in interface IBasicBlock<SSAInstruction>
      Returns:
      true if the basic block represents a catch block.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • isExitBlock

      public boolean isExitBlock()
      Description copied from interface: IBasicBlock
      Return true if the basic block represents the unique exit block.
      Specified by:
      isExitBlock in interface IBasicBlock<SSAInstruction>
      Returns:
      true if the basic block represents the unique exit block.
    • isEntryBlock

      public boolean isEntryBlock()
      Description copied from interface: IBasicBlock
      Return true if the basic block represents the unique entry block.
      Specified by:
      isEntryBlock in interface IBasicBlock<SSAInstruction>
      Returns:
      true if the basic block represents the unique entry block.
    • getMethod

      public IMethod getMethod()
      Specified by:
      getMethod in interface IBasicBlock<SSAInstruction>
      Returns:
      governing method for this block
    • endsInPEI

      public boolean endsInPEI()
    • endsInReturn

      public boolean endsInReturn()
    • getNumber

      public int getNumber()
      Description copied from interface: IBasicBlock
      Each basic block should have a unique number in its cfg
      Specified by:
      getNumber in interface IBasicBlock<SSAInstruction>
      Returns:
      the basic block's number
    • iterator

      public Iterator<SSAInstruction> iterator()
      Specified by:
      iterator in interface Iterable<SSAInstruction>