|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.node.Node
tip.node.PExp
tip.node.ABinopExp
public final class ABinopExp
ABinopExp
represents the binop
alternative of the exp
production in the AST.
Constructor Summary | |
---|---|
ABinopExp()
Creates a new ABinopExp node with no children. |
|
ABinopExp(PExp _left_,
PBinop _binop_,
PExp _right_)
Creates a new ABinopExp node with the given nodes as children. |
|
ABinopExp(PExp _left_,
PBinop _binop_,
PExp _right_,
Type _type_)
Creates a new ABinopExp node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseABinopExp(ABinopExp) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this ABinopExp
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this ABinopExp node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this ABinopExp node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
ABinopExp |
clone()
Returns a deep clone of this ABinopExp node. |
|
ABinopExp |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this ABinopExp node while putting all
old node-new node relations in the map oldToNewMap . |
|
PBinop |
getBinop()
Returns the PBinop node which is the binop child of this ABinopExp node. |
|
|
getChildren(Collection<T> collection,
NodeFilter<T> filter)
Adds all children of this ABinopExp node that are
accepted by the NodeFilter filter to collection . |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this ABinopExp node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
PExp |
getLeft()
Returns the PExp node which is the left child of this ABinopExp node. |
|
PExp |
getRight()
Returns the PExp node which is the right child of this ABinopExp node. |
|
Type |
getType()
Returns the type field of this ABinopExp node. |
|
EExp |
kindPExp()
Returns the EExp corresponding to the
type of this PExp node. |
|
void |
setBinop(PBinop value)
Sets the binop child of this ABinopExp node. |
|
void |
setLeft(PExp value)
Sets the left child of this ABinopExp node. |
|
void |
setRight(PExp value)
Sets the right child of this ABinopExp node. |
|
void |
setType(Type value)
Sets the type field of this ABinopExp node. |
|
String |
toString()
Returns a textual representation of this ABinopExp node. |
Methods inherited from class tip.node.PExp |
---|
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 |
Methods inherited from interface tip.node.NodeInterface |
---|
getAncestor, getAncestor, getAncestor, getChildren, getChildren, getDescendants, getDescendants, getDescendants, isOptionalInvariant, parent, replaceBy, setOptionalInvariant |
Constructor Detail |
---|
public ABinopExp()
ABinopExp
node with no children.
public ABinopExp(PExp _left_, PBinop _binop_, PExp _right_)
ABinopExp
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_left_
- the PExp
node for the Left
child of this ABinopExp
node_binop_
- the PBinop
node for the Binop
child of this ABinopExp
node_right_
- the PExp
node for the Right
child of this ABinopExp
nodepublic ABinopExp(PExp _left_, PBinop _binop_, PExp _right_, Type _type_)
ABinopExp
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_left_
- the PExp
node for the Left
child of this ABinopExp
node_binop_
- the PBinop
node for the Binop
child of this ABinopExp
node_right_
- the PExp
node for the Right
child of this ABinopExp
node_type_
- the Type
child of this ABinopExp
nodeMethod Detail |
---|
public ABinopExp clone()
ABinopExp
node.
clone
in interface NodeInterface
clone
in class PExp
ABinopExp
nodepublic ABinopExp clone(Map<Node,Node> oldToNewMap)
ABinopExp
node while putting all
old node-new node relations in the map oldToNewMap
.
clone
in interface NodeInterface
clone
in class PExp
oldToNewMap
- the map filled with the old node-new node relation
ABinopExp
nodepublic String toString()
ABinopExp
node.
toString
in class Object
ABinopExp
nodepublic EExp kindPExp()
EExp
corresponding to the
type of this PExp
node.
kindPExp
in class PExp
EExp
for this nodepublic PExp getLeft()
PExp
node which is the left
child of this ABinopExp
node.
PExp
node which is the left
child of this ABinopExp
nodepublic void setLeft(PExp value)
left
child of this ABinopExp
node.
value
- the new left
child of this ABinopExp
nodepublic PBinop getBinop()
PBinop
node which is the binop
child of this ABinopExp
node.
PBinop
node which is the binop
child of this ABinopExp
nodepublic void setBinop(PBinop value)
binop
child of this ABinopExp
node.
value
- the new binop
child of this ABinopExp
nodepublic PExp getRight()
PExp
node which is the right
child of this ABinopExp
node.
PExp
node which is the right
child of this ABinopExp
nodepublic void setRight(PExp value)
right
child of this ABinopExp
node.
value
- the new right
child of this ABinopExp
nodepublic Type getType()
type
field of this ABinopExp
node.
getType
in interface ITyped
getType
in class PExp
type
field of this ABinopExp
nodepublic void setType(Type value)
type
field of this ABinopExp
node.
setType
in interface ITyped
setType
in class PExp
value
- the new type
field of this ABinopExp
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
ABinopExp
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)
ABinopExp
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.caseABinopExp(ABinopExp)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this ABinopExp
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this ABinopExp
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)
ABinopExp
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 ABinopExp
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 |