scale.alias.shapirohorowitz
Class TypeVarCat

java.lang.Object
  extended by scale.alias.AliasVar
      extended by scale.alias.steensgaard.TypeVar
          extended by scale.alias.shapirohorowitz.TypeVarCat

public class TypeVarCat
extends TypeVar

A class that extends TypeVar class.

$Id: TypeVarCat.java,v 1.12 2006-02-28 16:37:02 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

This class is very similar to the TypeVar class. The principal difference is we have a new field that the type points off to - a category object that the type variable belongs to Also, when setting up the ECR, we reference new classes: ECR and LocationTypeCat.


Field Summary
 
Fields inherited from class scale.alias.steensgaard.TypeVar
ecr
 
Constructor Summary
TypeVarCat(Declaration n, int categories)
          Create a new type variable.
TypeVarCat(Declaration n, TypeVarCat v)
          Create a new type variable which is equivalent to the given type variable.
 
Method Summary
 void allPointsTo(Vector<ECR> tv)
          return all points-to relations from this type variable
 int getCategory()
          Return the category.
 java.lang.String getDisplayLabel()
          Return a String suitable for labeling this node in a graphical display.
 void setCategory(int category)
          Set the category of the type variable.
 java.lang.String toStringSpecial()
          Return a string representation of a type variable.
 
Methods inherited from class scale.alias.steensgaard.TypeVar
cleanup, getECR, getOriginalECR, isAlias, pointsTo, pointsToSize
 
Methods inherited from class scale.alias.AliasVar
getDeclName, toString, toStringClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeVarCat

public TypeVarCat(Declaration n,
                  int categories)
Create a new type variable. The initial type is ref(BOT, BOT).


TypeVarCat

public TypeVarCat(Declaration n,
                  TypeVarCat v)
Create a new type variable which is equivalent to the given type variable. That is, they belong to the same ECR.

Parameters:
n - the name of the variable.
v - the type variable with the type information.
Method Detail

setCategory

public void setCategory(int category)
Set the category of the type variable.


getCategory

public int getCategory()
Return the category.


allPointsTo

public void allPointsTo(Vector<ECR> tv)
return all points-to relations from this type variable

Overrides:
allPointsTo in class TypeVar

toStringSpecial

public java.lang.String toStringSpecial()
Return a string representation of a type variable.

Overrides:
toStringSpecial in class TypeVar
Returns:
a string representation of a type variable.

getDisplayLabel

public java.lang.String getDisplayLabel()
Description copied from class: TypeVar
Return a String suitable for labeling this node in a graphical display. This method should be over-ridden as it simplay returns the class name.

Overrides:
getDisplayLabel in class TypeVar
Returns:
a String suitable for labeling this node in a graphical display. This method should be over-ridden as it simplay returns the class name.