tip.node
Class AAssignVarStm

java.lang.Object
  extended by tip.node.Node
      extended by tip.node.PStm
          extended by tip.node.AAssignVarStm
All Implemented Interfaces:
Cloneable, NodeInterface

public final class AAssignVarStm
extends PStm

AAssignVarStm represents the assign_var alternative of the stm production in the AST.


Constructor Summary
AAssignVarStm()
          Creates a new AAssignVarStm node with no children.
AAssignVarStm(TAssign _token_, TIdentifier _identifier_, PExp _exp_)
          Creates a new AAssignVarStm node with the given nodes as children.
 
Method Summary
 void apply(Analysis caller)
          Calls the Analysis.caseAAssignVarStm(AAssignVarStm) of the Analysis caller.
<A> A
apply(Answer<A> caller)
          Returns the answer for caller by applying this AAssignVarStm node to the Answer visitor.
<Q> void
apply(Question<Q> caller, Q question)
          Applies this AAssignVarStm node to the Question visitor caller.
<Q,A> A
apply(QuestionAnswer<Q,A> caller, Q question)
          Returns the answer for caller by applying this AAssignVarStm node with the question to the QuestionAnswer visitor.
 void checkOptionalInvariant()
           
 AAssignVarStm clone()
          Returns a deep clone of this AAssignVarStm node.
 AAssignVarStm clone(Map<Node,Node> oldToNewMap)
          Creates a deep clone of this AAssignVarStm node while putting all old node-new node relations in the map oldToNewMap.
<T extends NodeInterface>
void
getChildren(Collection<T> collection, NodeFilter<T> filter)
          Adds all children of this AAssignVarStm node that are accepted by the NodeFilter filter to collection.
<T extends NodeInterface>
void
getDescendants(Collection<T> collection, NodeFilter<T> filter)
          Adds all descendants of this AAssignVarStm node (including the node itself) that are accepted by the NodeFilter filter to collection.
 PExp getExp()
          Returns the PExp node which is the exp child of this AAssignVarStm node.
 TIdentifier getIdentifier()
          Returns the TIdentifier node which is the identifier child of this AAssignVarStm node.
 TAssign getToken()
          Returns the TAssign node which is the token child of this AAssignVarStm node.
 EStm kindPStm()
          Returns the EStm corresponding to the type of this PStm node.
 void setExp(PExp value)
          Sets the exp child of this AAssignVarStm node.
 void setIdentifier(TIdentifier value)
          Sets the identifier child of this AAssignVarStm node.
 void setToken(TAssign value)
          Sets the token child of this AAssignVarStm node.
 String toString()
          Returns a textual representation of this AAssignVarStm node.
 
Methods inherited from class tip.node.PStm
kindNode
 
Methods inherited from class tip.node.Node
getAncestor, getAncestor, getAncestor, getChildren, getChildren, getDescendants, getDescendants, getDescendants, isOptionalInvariant, parent, replaceBy, setOptionalInvariant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AAssignVarStm

public AAssignVarStm()
Creates a new AAssignVarStm node with no children.


AAssignVarStm

public AAssignVarStm(TAssign _token_,
                     TIdentifier _identifier_,
                     PExp _exp_)
Creates a new AAssignVarStm node with the given nodes as children. The basic child nodes are removed from their previous parents.

Parameters:
_token_ - the TAssign node for the Token child of this AAssignVarStm node
_identifier_ - the TIdentifier node for the Identifier child of this AAssignVarStm node
_exp_ - the PExp node for the Exp child of this AAssignVarStm node
Method Detail

clone

public AAssignVarStm clone()
Returns a deep clone of this AAssignVarStm node.

Specified by:
clone in interface NodeInterface
Specified by:
clone in class PStm
Returns:
a deep clone of this AAssignVarStm node

clone

public AAssignVarStm clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this AAssignVarStm node while putting all old node-new node relations in the map oldToNewMap.

Specified by:
clone in interface NodeInterface
Specified by:
clone in class PStm
Parameters:
oldToNewMap - the map filled with the old node-new node relation
Returns:
a deep clone of this AAssignVarStm node

toString

public String toString()
Returns a textual representation of this AAssignVarStm node.

Overrides:
toString in class Object
Returns:
a textual representation of this AAssignVarStm node

kindPStm

public EStm kindPStm()
Returns the EStm corresponding to the type of this PStm node.

Specified by:
kindPStm in class PStm
Returns:
the EStm for this node

getToken

public TAssign getToken()
Returns the TAssign node which is the token child of this AAssignVarStm node.

Specified by:
getToken in class PStm
Returns:
the TAssign node which is the token child of this AAssignVarStm node

setToken

public void setToken(TAssign value)
Sets the token child of this AAssignVarStm node.

Parameters:
value - the new token child of this AAssignVarStm node

getIdentifier

public TIdentifier getIdentifier()
Returns the TIdentifier node which is the identifier child of this AAssignVarStm node.

Returns:
the TIdentifier node which is the identifier child of this AAssignVarStm node

setIdentifier

public void setIdentifier(TIdentifier value)
Sets the identifier child of this AAssignVarStm node.

Parameters:
value - the new identifier child of this AAssignVarStm node

getExp

public PExp getExp()
Returns the PExp node which is the exp child of this AAssignVarStm node.

Returns:
the PExp node which is the exp child of this AAssignVarStm node

setExp

public void setExp(PExp value)
Sets the exp child of this AAssignVarStm node.

Parameters:
value - the new exp child of this AAssignVarStm node

getDescendants

public <T extends NodeInterface> void getDescendants(Collection<T> collection,
                                                     NodeFilter<T> filter)
Adds all descendants of this AAssignVarStm node (including the node itself) that are accepted by the NodeFilter filter to collection.

Specified by:
getDescendants in interface NodeInterface
Specified by:
getDescendants in class Node
Parameters:
collection - the collection to which the descendants are added
filter - the NodeFilter used

getChildren

public <T extends NodeInterface> void getChildren(Collection<T> collection,
                                                  NodeFilter<T> filter)
Adds all children of this AAssignVarStm node that are accepted by the NodeFilter filter to collection.

Specified by:
getChildren in interface NodeInterface
Specified by:
getChildren in class Node
Parameters:
collection - the collection to which the children are added
filter - the NodeFilter used

checkOptionalInvariant

public void checkOptionalInvariant()
Specified by:
checkOptionalInvariant in interface NodeInterface
Specified by:
checkOptionalInvariant in class Node

apply

public void apply(Analysis caller)
Calls the Analysis.caseAAssignVarStm(AAssignVarStm) of the Analysis caller.

Specified by:
apply in interface NodeInterface
Specified by:
apply in class Node
Parameters:
sw - the Analysis to which this AAssignVarStm node is applied

apply

public <A> A apply(Answer<A> caller)
Returns the answer for caller by applying this AAssignVarStm node to the Answer visitor.

Specified by:
apply in interface NodeInterface
Specified by:
apply in class Node
Parameters:
caller - the Answer to which this node is applied
Returns:
the answer as returned from caller

apply

public <Q> void apply(Question<Q> caller,
                      Q question)
Applies this AAssignVarStm node to the Question visitor caller.

Specified by:
apply in interface NodeInterface
Specified by:
apply in class Node
Parameters:
caller - the Question to which this node is applied
question - the question provided to caller

apply

public <Q,A> A apply(QuestionAnswer<Q,A> caller,
                     Q question)
Returns the answer for caller by applying this AAssignVarStm node with the question to the QuestionAnswer visitor.

Specified by:
apply in interface NodeInterface
Specified by:
apply in class Node
Parameters:
caller - the QuestionAnswer to which this node is applied
question - the question provided to caller
Returns:
the answer as returned from caller