edu.cmu.cs.crystal.tac
Class TypeVariable
java.lang.Object
edu.cmu.cs.crystal.tac.Variable
edu.cmu.cs.crystal.tac.TypeVariable
public class TypeVariable
- extends Variable
In Java you can make calls that look like the following:
System.exit(0);
Here System is a class, but because out is a static field we access it
directly from the class name. In this example, System is a type variable
and in three address code System would be represented by an instance of this
class.
For some reason static fields are represented as SourceVariable
instances and not as a field access to a type variable.
- Author:
- Kevin Bierhoff
Method Summary |
|
dispatch(IVariableVisitor<T> visitor)
|
boolean |
equals(java.lang.Object obj)
|
ITypeBinding |
getType()
Because this class represents a type variable, getType and resolveType both
return the same value; the type represented by this variable. |
int |
hashCode()
|
ITypeBinding |
resolveType()
Because this class represents a type variable, getType and resolveType both
return the same value; the type represented by this variable. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
TypeVariable
public TypeVariable(ITypeBinding binding)
getType
public ITypeBinding getType()
- Because this class represents a type variable, getType and resolveType both
return the same value; the type represented by this variable.
- Returns:
- the type
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
resolveType
public ITypeBinding resolveType()
- Because this class represents a type variable, getType and resolveType both
return the same value; the type represented by this variable.
- Specified by:
resolveType
in class Variable
- See Also:
Expression.resolveTypeBinding()
dispatch
public <T> T dispatch(IVariableVisitor<T> visitor)
- Specified by:
dispatch
in class Variable