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

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.ast.Node
      extended by edu.ksu.cis.projects.bogor.ast.Transformation
          extended by edu.ksu.cis.projects.bogor.ast.InvokeTransformation
All Implemented Interfaces:
IExpParent, INextStateParent, Disposable, Serializable, Cloneable

public final class InvokeTransformation
extends Transformation

Invoke transformation AST.

Version:
CVS $Revision: 1.7 $ $Date: 2005/05/06 17:25:17 $
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
InvokeTransformation(Exp exp, InvokeExp invokeExp, boolean invisible, boolean visible, NextState nextState)
          Constructor with an exp.
InvokeTransformation(Exp exp, String id, InvokeExp invokeExp, boolean invisible, boolean visible, NextState nextState)
          Constructor with an exp and a local id.
InvokeTransformation(InvokeExp invokeExp, boolean invisible, boolean visible, NextState nextState)
          Default constructor.
InvokeTransformation(String id, InvokeExp invokeExp, boolean invisible, boolean visible, NextState nextState)
          Constructor with a local id.
 
Method Summary
 InvokeTransformation clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Disposes lhs, invokeExp, and nextState.
 InvokeExp getInvokeExp()
          Gets the invoke exp.
 int getLocalIndex()
          Gets the local index.
 String getOptionalId()
          Gets the optional local id.
 void setId(String newId)
          Sets the optional local id.
 void setInvokeExp(InvokeExp newInvokeExp)
          Sets the invoke exp.
 void setLocalIndex(int newLocalIndex)
          Sets the local index.
 String toString()
          Returns the string representation of this object.
 void visit(ASTVisitor visitor)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Transformation
getInvisible, getNextState, getOptionalExp, getParent, getVisible, setExp, setInvisible, setNextState, setParent, setVisible
 
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

InvokeTransformation

public InvokeTransformation(InvokeExp invokeExp,
                            boolean invisible,
                            boolean visible,
                            NextState nextState)
Default constructor. Sets this object as the exp's and invoke exp's parent.

Parameters:
invokeExp - The invoke exp. Must be non-null.
invisible - The invisible.
visible - The visible.
nextState - The nextstate. Must be non-null.

InvokeTransformation

public InvokeTransformation(Exp exp,
                            InvokeExp invokeExp,
                            boolean invisible,
                            boolean visible,
                            NextState nextState)
Constructor with an exp. Sets this object as the exp's and the invoke exp's parent.

Parameters:
exp - The expression condition. Must be non-null.
invokeExp - The invoke exp. Must be non-null.
invisible - The invisible.
visible - The visible.
nextState - The nextstate. Must be non-null.

InvokeTransformation

public InvokeTransformation(String id,
                            InvokeExp invokeExp,
                            boolean invisible,
                            boolean visible,
                            NextState nextState)
Constructor with a local id. Sets this object as the invoke exp's parent.

Parameters:
id - The local id. Must be non-null.
invokeExp - The invoke exp. Must be non-null.
invisible - The invisible.
visible - The visible.
nextState - The nextstate. Must be non-null.

InvokeTransformation

public InvokeTransformation(Exp exp,
                            String id,
                            InvokeExp invokeExp,
                            boolean invisible,
                            boolean visible,
                            NextState nextState)
Constructor with an exp and a local id. Sets this object as the exp's and invoke exp's parent.

Parameters:
exp - The expression condition. Must be non-null.
id - The local id. Must be non-null.
invokeExp - The invoke exp. Must be non-null.
invisible - The invisible.
visible - The visible.
nextState - The nextstate. Must be non-null.
Method Detail

setId

public void setId(String newId)
Sets the optional local id.

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

setInvokeExp

public void setInvokeExp(InvokeExp newInvokeExp)
Sets the invoke exp. Sets this object as the invoke exp's parent.

Parameters:
newInvokeExp - The new invoke exp. Must be non-null.

getInvokeExp

public InvokeExp getInvokeExp()
Gets the invoke exp.

Returns:
The invoke exp. Non-null.

setLocalIndex

public void setLocalIndex(int newLocalIndex)
Sets the local index.

Parameters:
newLocalIndex - The new local index.
See Also:
FSMSymbolTable.getLocalIndexTable()

getLocalIndex

public int getLocalIndex()
Gets the local index.

Returns:
The local index.
See Also:
FSMSymbolTable.getLocalIndexTable()

getOptionalId

public String getOptionalId()
Gets the optional local id.

Returns:
The optional local id.

clone

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

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

dispose

public void dispose()
Disposes lhs, invokeExp, and nextState. Once called, avoid using this object.

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

toString

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

Specified by:
toString in class Node
Returns:
" [ id := ] invoke [ virtual ] id ( { , args } ) nextState;\n".

visit

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