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

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.ASTArrayType
All Implemented Interfaces:
ITypeParent, Disposable, Serializable, Cloneable

public final class ASTArrayType
extends ASTType
implements ITypeParent

Array type AST.

Version:
CVS $Revision: 1.5 $ $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
ASTArrayType(ASTType type, int rank)
          Default constructor.
 
Method Summary
 ASTArrayType clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Disposes length and type.
 boolean equals(Object o)
           
 int getRank()
          Gets the rank.
 ASTType getType()
          Gets the type.
 int hashCode()
           
 void setRank(int newRank)
          Sets the rank.
 void setType(ASTType newType)
          Sets the type.
 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

ASTArrayType

public ASTArrayType(ASTType type,
                    int rank)
Default constructor. Sets this object as the type's parent.

Parameters:
type - The type. Must be non-null.
rank - The rank. Must be greater than zero.
Method Detail

setRank

public void setRank(int newRank)
Sets the rank.

Parameters:
newRank - The new rank. Must be greater than zero.

getRank

public int getRank()
Gets the rank.

Returns:
The rank. Greater than zero.

setType

public void setType(ASTType newType)
Sets the type. Sets this object as the type's parent.

Parameters:
newType - The new type. Must be non-null. Must not be an instance of ASTArrayType.

getType

public ASTType getType()
Gets the type.

Returns:
The type. Non-null.

clone

public ASTArrayType 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()
Disposes length and type. 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:
"type([])^rank".

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