tip.node
Class AEqBinop

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

public final class AEqBinop
extends PBinop

AEqBinop represents the eq alternative of the binop production in the AST.


Constructor Summary
AEqBinop()
          Creates a new AEqBinop node with no children.
AEqBinop(TEq _token_)
          Creates a new AEqBinop node with the given nodes as children.
 
Method Summary
 void apply(Analysis caller)
          Calls the Analysis.caseAEqBinop(AEqBinop) of the Analysis caller.
<A> A
apply(Answer<A> caller)
          Returns the answer for caller by applying this AEqBinop node to the Answer visitor.
<Q> void
apply(Question<Q> caller, Q question)
          Applies this AEqBinop node to the Question visitor caller.
<Q,A> A
apply(QuestionAnswer<Q,A> caller, Q question)
          Returns the answer for caller by applying this AEqBinop node with the question to the QuestionAnswer visitor.
 void checkOptionalInvariant()
           
 AEqBinop clone()
          Returns a deep clone of this AEqBinop node.
 AEqBinop clone(Map<Node,Node> oldToNewMap)
          Creates a deep clone of this AEqBinop 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 AEqBinop 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 AEqBinop node (including the node itself) that are accepted by the NodeFilter filter to collection.
 TEq getToken()
          Returns the TEq node which is the token child of this AEqBinop node.
 EBinop kindPBinop()
          Returns the EBinop corresponding to the type of this PBinop node.
 void setToken(TEq value)
          Sets the token child of this AEqBinop node.
 String toString()
          Returns a textual representation of this AEqBinop node.
 
Methods inherited from class tip.node.PBinop
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

AEqBinop

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


AEqBinop

public AEqBinop(TEq _token_)
Creates a new AEqBinop node with the given nodes as children. The basic child nodes are removed from their previous parents.

Parameters:
_token_ - the TEq node for the Token child of this AEqBinop node
Method Detail

clone

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

Specified by:
clone in interface NodeInterface
Specified by:
clone in class PBinop
Returns:
a deep clone of this AEqBinop node

clone

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

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

toString

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

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

kindPBinop

public EBinop kindPBinop()
Returns the EBinop corresponding to the type of this PBinop node.

Specified by:
kindPBinop in class PBinop
Returns:
the EBinop for this node

getToken

public TEq getToken()
Returns the TEq node which is the token child of this AEqBinop node.

Specified by:
getToken in class PBinop
Returns:
the TEq node which is the token child of this AEqBinop node

setToken

public void setToken(TEq value)
Sets the token child of this AEqBinop node.

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

getDescendants

public <T extends NodeInterface> void getDescendants(Collection<T> collection,
                                                     NodeFilter<T> filter)
Adds all descendants of this AEqBinop 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 AEqBinop 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.caseAEqBinop(AEqBinop) of the Analysis caller.

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

apply

public <A> A apply(Answer<A> caller)
Returns the answer for caller by applying this AEqBinop 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 AEqBinop 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 AEqBinop 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