|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Temp.Temp
public class Temp
The Temp class represents a temporary
variable. This class maintains static state to allow us to allocate
guaranteed-unique names for our temps.
TypeMap,
ConstMap,
TempList,
Serialized Form| Field Summary | |
|---|---|
static ArrayFactory<Temp> |
arrayFactory
Returns an array of Temps. |
static ArrayFactory<Temp[]> |
doubleArrayFactory
Returns an array of Temp[]s. |
static Indexer |
INDEXER
A net.cscott.jutil.Indexer specifically for working
only with Temps generated by
this.tempFactory(). |
| Constructor Summary | |
|---|---|
Temp(Temp t)
Creates a new temp based on the name of an existing temp. |
|
Temp(TempFactory tf)
Creates a unique temporary variable, using default prefix ("t"). |
|
Temp(TempFactory tf,
String prefix)
Creates a unique temporary with a suggested name. |
|
| Method Summary | |
|---|---|
Temp |
clone()
Clones a Temp using the same TempFactory. |
Temp |
clone(TempFactory tf)
Clones a Temp into a different TempFactory. |
int |
compareTo(Temp o)
Comparable interface: sorted by fullname(). |
String |
fullname()
Returns the full name of this temporary, including scope information. |
int |
hashCode()
Returns a hashcode for this temporary. |
String |
name()
Returns the common name of this Temp; scope information
not included. |
TempFactory |
tempFactory()
Returns the tempFactory of this temporary. |
static TempFactory |
tempFactory(String scope)
Returns a new TempFactory with the given scope. |
String |
toString()
Returns a string representation of this temporary. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Indexer INDEXER
net.cscott.jutil.Indexer specifically for working
only with Temps generated by
this.tempFactory().
public static final ArrayFactory<Temp> arrayFactory
Temps.
public static final ArrayFactory<Temp[]> doubleArrayFactory
Temp[]s.
| Constructor Detail |
|---|
public Temp(TempFactory tf)
public Temp(Temp t)
public Temp(TempFactory tf,
String prefix)
TempFactory.
prefix - the name prefix.
prefix may not be null.| Method Detail |
|---|
public String fullname()
public String name()
Temp; scope information
not included.
public String toString()
toString in class Objectpublic TempFactory tempFactory()
public Temp clone(TempFactory tf)
Temp into a different TempFactory.
public Temp clone()
Temp using the same TempFactory.
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Temp o)
compareTo in interface Comparable<Temp>public static TempFactory tempFactory(String scope)
TempFactory with the given scope.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||