edu.rice.cs.dynamicjava.interpreter
Class TypeNameChecker

java.lang.Object
  extended by edu.rice.cs.dynamicjava.interpreter.TypeNameChecker

public class TypeNameChecker
extends java.lang.Object

This tree visitor checks the typing rules for TypeNames and converts the name to a Type. The following properties (from NodeProperties) are set:


Constructor Summary
TypeNameChecker(TypeContext ctx, Options options)
           
 
Method Summary
 Type check(TypeName t)
          Get the type corresponding to t; verify that it is well-formed.
 java.lang.Iterable<Type> checkList(java.lang.Iterable<? extends TypeName> l)
          Invoke check(koala.dynamicjava.tree.TypeName) on each element of a list.
 Type checkStructure(TypeName t)
          Get the type corresponding to t; verify that it is structurally well-formed, but delay full well-formedness checking until a later ensureWellFormed(koala.dynamicjava.tree.TypeName) call.
 java.lang.Iterable<Type> checkStructureForList(java.lang.Iterable<? extends TypeName> l)
          Invoke checkStructure(koala.dynamicjava.tree.TypeName) on each element of a list.
 void checkStructureForTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
          Tag the given type parameters with a new VariableType, and set the bounds appropriately.
 void checkTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
          Tag the given type parameters with a new VariableType, and set the bounds appropriately; verify that the results are well-formed.
 void ensureWellFormed(TypeName t)
          Verify that a TypeName that has already been checked is well-formed (according to TypeSystem.isWellFormed(edu.rice.cs.dynamicjava.symbol.type.Type)).
 void ensureWellFormedList(java.lang.Iterable<? extends TypeName> l)
          Invoke ensureWellFormed(koala.dynamicjava.tree.TypeName) on each element of a list.
 void ensureWellFormedTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
          Verify that the given type parameters (for which checkStructureForTypeParameters(java.lang.Iterable) has already been invoked) are well-formed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeNameChecker

public TypeNameChecker(TypeContext ctx,
                       Options options)
Method Detail

check

public Type check(TypeName t)
Get the type corresponding to t; verify that it is well-formed.


checkStructure

public Type checkStructure(TypeName t)
Get the type corresponding to t; verify that it is structurally well-formed, but delay full well-formedness checking until a later ensureWellFormed(koala.dynamicjava.tree.TypeName) call.


ensureWellFormed

public void ensureWellFormed(TypeName t)
Verify that a TypeName that has already been checked is well-formed (according to TypeSystem.isWellFormed(edu.rice.cs.dynamicjava.symbol.type.Type)).


checkList

public java.lang.Iterable<Type> checkList(java.lang.Iterable<? extends TypeName> l)
Invoke check(koala.dynamicjava.tree.TypeName) on each element of a list.


checkStructureForList

public java.lang.Iterable<Type> checkStructureForList(java.lang.Iterable<? extends TypeName> l)
Invoke checkStructure(koala.dynamicjava.tree.TypeName) on each element of a list.


ensureWellFormedList

public void ensureWellFormedList(java.lang.Iterable<? extends TypeName> l)
Invoke ensureWellFormed(koala.dynamicjava.tree.TypeName) on each element of a list.


checkTypeParameters

public void checkTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
Tag the given type parameters with a new VariableType, and set the bounds appropriately; verify that the results are well-formed.


checkStructureForTypeParameters

public void checkStructureForTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
Tag the given type parameters with a new VariableType, and set the bounds appropriately.


ensureWellFormedTypeParameters

public void ensureWellFormedTypeParameters(java.lang.Iterable<? extends TypeParameter> tparams)
Verify that the given type parameters (for which checkStructureForTypeParameters(java.lang.Iterable) has already been invoked) are well-formed.