edu.cmu.cs.crystal.util.typehierarchy
Class TypeNode
java.lang.Object
edu.cmu.cs.crystal.util.typehierarchy.TypeNode
public class TypeNode
- extends Object
TypeNode
public TypeNode(String name,
boolean isPrimitive)
TypeNode
public TypeNode(String name)
isCompleteDown
public boolean isCompleteDown()
- Returns:
- True if this type knows all of its subtypes, false otherwise.
completedDown
public void completedDown()
- To be called when this type knows all of its subtypes.
isPrimitive
public boolean isPrimitive()
isDirectSupertype
public boolean isDirectSupertype(TypeNode superNode)
isSupertype
public boolean isSupertype(TypeNode superNode)
addSubtype
public void addSubtype(TypeNode sub)
addSupertype
public void addSupertype(TypeNode superNode)
collectAllSubs
public void collectAllSubs(HashSet<String> subs)
- Recursively adds all the subtypes of this node to the subs set
- Parameters:
subs
- An out parameter, must be initialized
toString
public String toString()
- Overrides:
toString
in class Object