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

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

public final class IdType
extends ASTType

Id type AST

Version:
CVS $Revision: 1.6 $ $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
IdType(String id)
          Default constructor.
 
Method Summary
 IdType clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Removes reference to id.
 boolean equals(Object o)
           
 String getId()
          Gets the id.
 int hashCode()
           
 void setId(String newId)
          Sets the id.
 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

IdType

public IdType(String id)
Default constructor.

Parameters:
id - The id. Must be non-null.
Method Detail

setId

public void setId(String newId)
Sets the id.

Parameters:
newId - The new id. Must be non-null.

getId

public String getId()
Gets the id.

Returns:
The id. Non-null.

clone

public IdType 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()
Removes reference to id. 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