harpoon.Temp
Class Label
java.lang.Object
harpoon.Temp.Label
public class Label
- extends Object
A Label
represents a (symbolic) address in assembly language.
- Version:
- $Id: Label.java,v 1.4 2002/02/25 21:07:05 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
Constructor Summary |
Label()
Makes a new label with an arbitrary name. |
Label(String n)
Makes a new label that prints as "name". |
name
public final String name
Label
public Label(String n)
- Makes a new label that prints as "name".
Repeated calls to new Label(s) with
the same name s will return labels which
are equal to each other according to the
equals()
method, but not reference equivalent.
Label
public Label()
- Makes a new label with an arbitrary name.
toString
public String toString()
- a printable representation of the label, for use in assembly
language output. Note that the returned
String
consists only of a name; any platform specific modifiers (such as
a colon) need to be appended by the code calling
toString()
.
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object