dovs.instructions
Class Label

java.lang.Object
  extended by dovs.instructions.Label

public class Label
extends Object

A label. Note that the actual occurrence of the label is represented by the Ilabel instruction.


Field Summary
private  String name
           
private static int next_label_id
           
 
Constructor Summary
Label(String name)
           
 
Method Summary
 boolean equals(Object o)
           
 String getName()
           
 int hashCode()
           
static Label make(String prefix)
          Make a unique label whose name starts with the given string.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private String name

next_label_id

private static int next_label_id
Constructor Detail

Label

public Label(String name)
Method Detail

getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object

make

public static Label make(String prefix)
Make a unique label whose name starts with the given string. The label name will be the given prefix followed by a number.

Parameters:
prefix - the desired label name prefix
Returns:
a fresh, unique label

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object