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

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

public class PrimitiveExtType
extends PrimitiveType

Version:
CVS $Revision: 1.4 $ $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
 
Constructor Summary
PrimitiveExtType(String id, Type[] paramTypes)
          Default constructor.
 
Method Summary
 void dispose()
          Remove references.
 boolean equals(Object o)
          Checks whether this object is equal to another object.
 String getId()
          Gets the fully qualified name of this primitive type extension type.
 Type getTypeArg(int index)
          Gets the type argument at a certain index.
 int getTypeArgCount()
          Gets the number of type arguments.
 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
 

Constructor Detail

PrimitiveExtType

public PrimitiveExtType(String id,
                        Type[] paramTypes)
Default constructor.

Parameters:
id - The fully qualified name for this primitive type extension type. Non-null.
paramTypes - The type arguments for this primitive type extension type. Must be non-null. Each element must be non-null.
Method Detail

getId

public String getId()
Gets the fully qualified name of this primitive type extension type.

Returns:
The fully qualified name of this primitive type extension type. Non-null.

getTypeArg

public Type getTypeArg(int index)
Gets the type argument at a certain index.

Parameters:
index - The index of the type argument. Must be between 0 and getTypeArgCount() - 1.
Returns:
The type argument at the given index. Non-null.

getTypeArgCount

public int getTypeArgCount()
Gets the number of type arguments.

Returns:
The number of type arguments.

dispose

public void dispose()
Description copied from interface: Disposable
Remove 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 id is the same and the argument types are the same. 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