|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.node.Node
tip.node.PBinop
tip.node.APlusBinop
public final class APlusBinop
APlusBinop
represents the plus
alternative of the binop
production in the AST.
Constructor Summary | |
---|---|
APlusBinop()
Creates a new APlusBinop node with no children. |
|
APlusBinop(TPlus _token_)
Creates a new APlusBinop node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseAPlusBinop(APlusBinop) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this APlusBinop
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this APlusBinop node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this APlusBinop node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
APlusBinop |
clone()
Returns a deep clone of this APlusBinop node. |
|
APlusBinop |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this APlusBinop node while putting all
old node-new node relations in the map oldToNewMap . |
|
|
getChildren(Collection<T> collection,
NodeFilter<T> filter)
Adds all children of this APlusBinop node that are
accepted by the NodeFilter filter to collection . |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this APlusBinop node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
TPlus |
getToken()
Returns the TPlus node which is the token child of this APlusBinop node. |
|
EBinop |
kindPBinop()
Returns the EBinop corresponding to the
type of this PBinop node. |
|
void |
setToken(TPlus value)
Sets the token child of this APlusBinop node. |
|
String |
toString()
Returns a textual representation of this APlusBinop 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 |
---|
public APlusBinop()
APlusBinop
node with no children.
public APlusBinop(TPlus _token_)
APlusBinop
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_token_
- the TPlus
node for the Token
child of this APlusBinop
nodeMethod Detail |
---|
public APlusBinop clone()
APlusBinop
node.
clone
in interface NodeInterface
clone
in class PBinop
APlusBinop
nodepublic APlusBinop clone(Map<Node,Node> oldToNewMap)
APlusBinop
node while putting all
old node-new node relations in the map oldToNewMap
.
clone
in interface NodeInterface
clone
in class PBinop
oldToNewMap
- the map filled with the old node-new node relation
APlusBinop
nodepublic String toString()
APlusBinop
node.
toString
in class Object
APlusBinop
nodepublic EBinop kindPBinop()
EBinop
corresponding to the
type of this PBinop
node.
kindPBinop
in class PBinop
EBinop
for this nodepublic TPlus getToken()
TPlus
node which is the token
child of this APlusBinop
node.
getToken
in class PBinop
TPlus
node which is the token
child of this APlusBinop
nodepublic void setToken(TPlus value)
token
child of this APlusBinop
node.
value
- the new token
child of this APlusBinop
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
APlusBinop
node (including the node itself) that are
accepted by the NodeFilter
filter
to collection
.
getDescendants
in interface NodeInterface
getDescendants
in class Node
collection
- the collection to which the descendants are addedfilter
- the NodeFilter
usedpublic <T extends NodeInterface> void getChildren(Collection<T> collection, NodeFilter<T> filter)
APlusBinop
node that are
accepted by the NodeFilter
filter
to collection
.
getChildren
in interface NodeInterface
getChildren
in class Node
collection
- the collection to which the children are addedfilter
- the NodeFilter
usedpublic void checkOptionalInvariant()
checkOptionalInvariant
in interface NodeInterface
checkOptionalInvariant
in class Node
public void apply(Analysis caller)
Analysis.caseAPlusBinop(APlusBinop)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this APlusBinop
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this APlusBinop
node to the Answer
visitor.
apply
in interface NodeInterface
apply
in class Node
caller
- the Answer
to which this node is applied
caller
public <Q> void apply(Question<Q> caller, Q question)
APlusBinop
node to the Question
visitor caller
.
apply
in interface NodeInterface
apply
in class Node
caller
- the Question
to which this node is appliedquestion
- the question provided to caller
public <Q,A> A apply(QuestionAnswer<Q,A> caller, Q question)
caller
by applying this APlusBinop
node with the
question
to the QuestionAnswer
visitor.
apply
in interface NodeInterface
apply
in class Node
caller
- the QuestionAnswer
to which this node is appliedquestion
- the question provided to caller
caller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |