edu.cmu.cs.crystal.tac.model
Class TypeVariable

java.lang.Object
  extended by edu.cmu.cs.crystal.tac.model.Variable
      extended by 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

Constructor Summary
TypeVariable(ITypeBinding binding)
           
 
Method Summary
<T> T
dispatch(IVariableVisitor<T> visitor)
           
 boolean equals(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.
 String toString()
           
 
Methods inherited from class edu.cmu.cs.crystal.tac.model.Variable
getSourceString, isUnqualifiedSuper, isUnqualifiedThis
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeVariable

public TypeVariable(ITypeBinding binding)
Method Detail

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