edu.cmu.cs.crystal.tac.model
Class TypeVariable
java.lang.Object
edu.cmu.cs.crystal.tac.model.Variable
edu.cmu.cs.crystal.tac.model.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
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 Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class 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