All Packages Class Hierarchy This Package Previous Next Index
Class harpoon.Temp.Temp
java.lang.Object
|
+----harpoon.Temp.Temp
- public class Temp
- extends Object
The Temp
class represents a temporary
variable. This class maintains static state to allow us to allocate
guaranteed-unique names for our temps.
- Version:
- $Id: Temp.java,v 1.14 1998/11/10 00:47:41 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- TypeMap, ConstMap, TempList
-
Temp()
- Creates a unique temporary variable, using default prefix ("t").
-
Temp(String)
- Creates a unique temporary with a suggested name.
-
Temp(Temp)
- Creates a new temp based on the name of an existing temp.
-
hashCode()
- Returns a hashcode for this temporary.
-
name()
- Returns the name of this temporary
-
toString()
- Returns a string representation of this temporary.
Temp
public Temp()
- Creates a unique temporary variable, using default prefix ("t").
Temp
public Temp(String m_prefix)
- Creates a unique temporary with a suggested name.
Trailing underscores will be stripped from the suggested name,
and a digit string will be appended to make the name unique.
- Parameters:
- m_prefix - the name prefix.
m_prefix
may not be null.
Temp
public Temp(Temp t)
- Creates a new temp based on the name of an existing temp.
name
public String name()
- Returns the name of this temporary
toString
public String toString()
- Returns a string representation of this temporary.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this temporary.
The hashcode is the same as the hashcode of the hashcode's name.
- Overrides:
- hashCode in class Object
All Packages Class Hierarchy This Package Previous Next Index