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

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

public class LiteralExp
extends Exp
implements ILiteralParent

Literal 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
LiteralExp(Literal literal)
          Default constructor.
 
Method Summary
 LiteralExp clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Disposes literal.
 Literal getLiteral()
          Gets the literal.
 void setLiteral(Literal newLiteral)
          Sets the literal.
 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

LiteralExp

public LiteralExp(Literal literal)
Default constructor. Sets this object as the literal's parent.

Parameters:
literal - The literal.
Method Detail

setLiteral

public void setLiteral(Literal newLiteral)
Sets the literal. Sets this object as the literal's parent.

Parameters:
newLiteral - The new literal. Must be non-null.

getLiteral

public Literal getLiteral()
Gets the literal.

Returns:
The literal. Non-null.

clone

public LiteralExp 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()
Disposes literal. 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:
"literal".

visit

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