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

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

public final class InstanceofExp
extends Exp
implements ITypeParent

Instanceof exp AST.

Version:
CVS $Revision: 1.4 $ $Date: 2005/01/13 23:40:08 $
Author:
Robby
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Exp
TYPE
 
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node
ILLEGAL_LOCAL_ID_CHAR
 
Constructor Summary
InstanceofExp(Exp exp, ASTType type)
          Default constructor.
 
Method Summary
 InstanceofExp clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Removes reference to id, and disposes exp.
 Exp getExp()
          Gets the exp.
 ASTType getType()
          Gets the type.
 void setExp(Exp newExp)
          Sets the exp.
 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.Exp
getParent, setParent
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node
getLocationInfo, getProperty, putProperty, setLocationInfo
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstanceofExp

public InstanceofExp(Exp exp,
                     ASTType type)
Default constructor. Sets this object as the exp's and the type's parent.

Parameters:
exp - The exp. Must be non-null.
type - The type. Must be non-null.
Method Detail

setExp

public void setExp(Exp newExp)
Sets the exp. Sets this object as the exp's parent.

Parameters:
newExp - The new exp. Must be non-null.

getExp

public Exp getExp()
Gets the exp.

Returns:
The exp. Non-null.

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.

getType

public ASTType getType()
Gets the type.

Returns:
The type. Non-null.

clone

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

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

dispose

public void dispose()
Removes reference to id, and disposes exp. Once called, avoid using this object.

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

toString

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

Specified by:
toString in class Node
Returns:
"exp instanceof type".

visit

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