com.ibm.wala.cast.ir.translator
Class AstTranslator.PreBasicBlock

java.lang.Object
  extended by com.ibm.wala.cast.ir.translator.AstTranslator.PreBasicBlock
All Implemented Interfaces:
IBasicBlock, INodeWithNumber, java.lang.Iterable<IInstruction>
Enclosing class:
AstTranslator

protected static final class AstTranslator.PreBasicBlock
extends java.lang.Object
implements INodeWithNumber, IBasicBlock


Constructor Summary
protected AstTranslator.PreBasicBlock()
           
 
Method Summary
 int getFirstInstructionIndex()
          Get the index of the first instruction in the basic block.
 int getGraphNodeId()
          A non-negative integer which serves as an identifier for this node in it's "dominant" graph.
 int getLastInstructionIndex()
          Get the index of the last instruction in the basic block.
 IMethod getMethod()
           
 int getNumber()
          Each basic block should have a unique number in its cfg
 boolean isCatchBlock()
          Return true if the basic block represents a catch block.
 boolean isEntryBlock()
          Return true if the basic block represents the unique entry block.
 boolean isExitBlock()
          Return true if the basic block represents the unique exit block.
 boolean isHandlerBlock()
           
 java.util.Iterator<IInstruction> iterator()
           
 void setGraphNodeId(int number)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AstTranslator.PreBasicBlock

protected AstTranslator.PreBasicBlock()
Method Detail

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
Returns:
the basic block's number

getGraphNodeId

public int getGraphNodeId()
Description copied from interface: INodeWithNumber
A non-negative integer which serves as an identifier for this node in it's "dominant" graph. Initially this number is -1; a NumberedGraph will set it to a non-negative value when this node is inserted into the graph

Specified by:
getGraphNodeId in interface INodeWithNumber
Returns:
the identifier

setGraphNodeId

public void setGraphNodeId(int number)
Specified by:
setGraphNodeId in interface INodeWithNumber

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
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
Returns:
the instruction index for the last instruction in the basic 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
Returns:
true if the basic block represents the unique entry block.

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
Returns:
true if the basic block represents the unique exit block.

isHandlerBlock

public boolean isHandlerBlock()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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
Returns:
true if the basic block represents a catch block.

getMethod

public IMethod getMethod()
Specified by:
getMethod in interface IBasicBlock
Returns:
governing method for this block

iterator

public java.util.Iterator<IInstruction> iterator()
Specified by:
iterator in interface java.lang.Iterable<IInstruction>