org.jikesrvm.compilers.opt.controlflow
Class AnnotatedLSTNode.BBEnum

java.lang.Object
  extended by org.jikesrvm.compilers.opt.controlflow.AnnotatedLSTNode.BBEnum
All Implemented Interfaces:
Enumeration<BasicBlock>
Enclosing class:
AnnotatedLSTNode

static final class AnnotatedLSTNode.BBEnum
extends Object
implements Enumeration<BasicBlock>

This class implements an enumeration of BasicBlocks. It is used for iterating over basic blocks in a fashion determined by the order in which basic blocks are added.


Field Summary
private  ArrayList<BasicBlock> blocks
          ArrayList holding basic blocks
private  int currentBlock
          The current block of the iterator
 
Constructor Summary
AnnotatedLSTNode.BBEnum()
          Constructor
 
Method Summary
 void add(BasicBlock block)
          Insert a block to the end of the list
 boolean hasMoreElements()
          Is the iterator at the end of the vector
 BasicBlock nextElement()
          Get the next element from the vector and move the current block along
 String toString()
          String representation of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

blocks

private final ArrayList<BasicBlock> blocks
ArrayList holding basic blocks


currentBlock

private int currentBlock
The current block of the iterator

Constructor Detail

AnnotatedLSTNode.BBEnum

public AnnotatedLSTNode.BBEnum()
Constructor

Method Detail

add

public void add(BasicBlock block)
Insert a block to the end of the list

Parameters:
block - to insert

hasMoreElements

public boolean hasMoreElements()
Is the iterator at the end of the vector

Specified by:
hasMoreElements in interface Enumeration<BasicBlock>
Returns:
whether there are more elements in the vector

nextElement

public BasicBlock nextElement()
Get the next element from the vector and move the current block along

Specified by:
nextElement in interface Enumeration<BasicBlock>
Returns:
next element

toString

public String toString()
String representation of the object

Overrides:
toString in class Object
Returns:
string representing the object