edu.ksu.cis.projects.bogor.ast
Class ASTExtType

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.ast.Node
      extended by edu.ksu.cis.projects.bogor.ast.ASTType
          extended by edu.ksu.cis.projects.bogor.ast.ASTExtType
All Implemented Interfaces:
ITypeParent, Disposable, Serializable, Cloneable

public class ASTExtType
extends ASTType
implements ITypeParent

Extension Type AST.

Version:
CVS $Revision: 1.10 $ $Date: 2005/05/06 19:33:49 $
Author:
Robby
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node
ILLEGAL_LOCAL_ID_CHAR
 
Constructor Summary
ASTExtType(String id, List<? extends ASTType> argTypes)
          Default constructor.
 
Method Summary
 ASTExtType clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Removes reference to parent.
 boolean equals(Object o)
           
 String getId()
          Gets the fully qualified name of this type extension.
 ASTType getTypeArg(int index)
          Gets the type argument at a certain index.
 int getTypeArgCount()
          Gets the number of type arguments of this type extension.
 int hashCode()
           
 void setId(String newId)
          Sets the fully qualified name of this type extension.
 void setTypeArgs(List<? extends ASTType> newParameterTypes)
          Sets the type arguments for this type extension.
 String toString()
          Returns the string representation of this object.
 void visit(ASTVisitor visitor)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.ASTType
getParent, setParent
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node
getLocationInfo, getProperty, putProperty, setLocationInfo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTExtType

public ASTExtType(String id,
                  List<? extends ASTType> argTypes)
Default constructor.

Parameters:
id - The fully qualified name of the type extension. Must be non-null.
argTypes - The type arguments of this type extension. Must be non-null. Each argument must be non-null.
Method Detail

setId

public void setId(String newId)
Sets the fully qualified name of this type extension.

Parameters:
newId - The new fully qualified name for this type extension. Must be non-null.

getId

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

Returns:
The fully qualified name of this type extension.

getTypeArg

public ASTType 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 AST type of the argument at the given index. Non-null.

getTypeArgCount

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

Returns:
The number of type arguments of this type extension.

setTypeArgs

public void setTypeArgs(List<? extends ASTType> newParameterTypes)
Sets the type arguments for this type extension.

Parameters:
newParameterTypes - The new type arguments for this type extension. Must be non-null. Each element must be of type ASTType. Sets this functional type as each element's parent.

clone

public ASTExtType clone()
Clones this object (deep clone); including location info.

Specified by:
clone in class ASTType
Returns:
The clone of this object. Non-null.

dispose

public void dispose()
Description copied from class: ASTType
Removes reference to parent. Once called, avoid using this object.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class ASTType

toString

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

Specified by:
toString in class Node
Returns:
"id

visit

public void visit(ASTVisitor visitor)
Specified by:
visit in class Node

hashCode

public int hashCode()
Specified by:
hashCode in class ASTType

equals

public boolean equals(Object o)
Specified by:
equals in class ASTType