edu.ksu.cis.projects.bogor.type
Class TypeExtensionType

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.type.Type
      extended by edu.ksu.cis.projects.bogor.type.NonPrimitiveType
          extended by edu.ksu.cis.projects.bogor.type.TypeExtensionType
All Implemented Interfaces:
Disposable, Serializable

public class TypeExtensionType
extends NonPrimitiveType

Represents a type extension type.

Version:
CVS $Revision: 1.3 $ $Date: 2005/01/29 04:54:31 $
Author:
Robby
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ksu.cis.projects.bogor.type.Type
hashCode, typeId
 
Method Summary
 void dispose()
          Removes references.
 boolean equals(Object o)
          Checks whether this object is equal to another object.
 String getId()
          Gets the type extension id.
 String getTypeVariable(int index)
          Gets the fixed type variable at a particular index.
 int getTypeVariableCount()
          Gets the number of fixed type variables.
 ASTType toASTType()
          Get a newly constructed (unowned) syntax tree node suitable for declaring this type statically.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class edu.ksu.cis.projects.bogor.type.Type
getTypeId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public String getId()
Gets the type extension id.

Returns:
The extension type id. Non-null.

getTypeVariable

public String getTypeVariable(int index)
Gets the fixed type variable at a particular index.

Parameters:
index - The index of the type variable. Must be at least zero and at most less than the number of fixed type variables.
Returns:
The fixed type variable at the given index.

getTypeVariableCount

public int getTypeVariableCount()
Gets the number of fixed type variables.

Returns:
The number of fixed type variables. At least zero.

dispose

public void dispose()
Removes references. Once called, avoid using this object.


equals

public boolean equals(Object o)
Checks whether this object is equal to another object.

Overrides:
equals in class Object
Parameters:
o - Another object to check equality to.
Returns:
True, if the other object is also an ExtensionType with the same id. False, otherwise.

toString

public String toString()
Returns the string representation of this object.

Overrides:
toString in class Object
Returns:
"id[ ]".

toASTType

public ASTType toASTType()
Get a newly constructed (unowned) syntax tree node suitable for declaring this type statically.

Specified by:
toASTType in class Type
Returns:
the node, or null if the type is undeclarable