edu.rice.cs.dynamicjava.symbol
Class BoundedSymbol
java.lang.Object
edu.rice.cs.dynamicjava.symbol.BoundedSymbol
public class BoundedSymbol
- extends java.lang.Object
Represents a type variable or wildcard. For simplicity, two kinds of symbols may be
represented. Declared symbols have a name; generated symbols (including
wildcards) are unnamed. In both cases, equality is defined in terms of an id object, rather
than by equating names or other parameters. Clients are responsible for ensuring, where
two symbols have the same id (according to equals()), that the other
properties of the symbol are the same.
Each symbol has an upper and a lower bound. These may be initialized after object creation,
but must be initialized exactly once before use, or an exception will occur.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BoundedSymbol
public BoundedSymbol(java.lang.Object id)
BoundedSymbol
public BoundedSymbol(java.lang.Object id,
java.lang.String name)
BoundedSymbol
public BoundedSymbol(java.lang.Object id,
Type upperBound,
Type lowerBound)
BoundedSymbol
public BoundedSymbol(java.lang.Object id,
java.lang.String name,
Type upperBound,
Type lowerBound)
generated
public boolean generated()
name
public java.lang.String name()
initializeUpperBound
public void initializeUpperBound(Type t)
initializeLowerBound
public void initializeLowerBound(Type t)
upperBound
public Type upperBound()
lowerBound
public Type lowerBound()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object