|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.node.Node
tip.node.PBody
tip.node.ABody
public final class ABody
ABody
represents the alternative of the
body
production in the AST.
Constructor Summary | |
---|---|
ABody()
Creates a new ABody node with no children. |
|
ABody(ABlock _block_)
Creates a new ABody node with the given nodes as children. |
|
ABody(ABlock _block_,
List<? extends Instruction> _instructions_)
Creates a new ABody node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseABody(ABody) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this ABody
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this ABody node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this ABody node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
ABody |
clone()
Returns a deep clone of this ABody node. |
|
ABody |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this ABody node while putting all
old node-new node relations in the map oldToNewMap . |
|
ABlock |
getBlock()
Returns the ABlock node which is the block child of this ABody node. |
|
|
getChildren(Collection<T> collection,
NodeFilter<T> filter)
Adds all children of this ABody node that are
accepted by the NodeFilter filter to collection . |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this ABody node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
LinkedList<Instruction> |
getInstructions()
Returns the instructions field of this ABody node. |
|
void |
setBlock(ABlock value)
Sets the block child of this ABody node. |
|
void |
setInstructions(List<? extends Instruction> value)
Sets the instructions field of this ABody node. |
|
String |
toString()
Returns a textual representation of this ABody node. |
Methods inherited from class tip.node.PBody |
---|
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 ABody()
ABody
node with no children.
public ABody(ABlock _block_)
ABody
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_block_
- the ABlock
node for the Block
child of this ABody
nodepublic ABody(ABlock _block_, List<? extends Instruction> _instructions_)
ABody
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_block_
- the ABlock
node for the Block
child of this ABody
node_instructions_
- the Instructions
child of this ABody
nodeMethod Detail |
---|
public ABody clone()
ABody
node.
clone
in interface NodeInterface
clone
in class PBody
ABody
nodepublic ABody clone(Map<Node,Node> oldToNewMap)
ABody
node while putting all
old node-new node relations in the map oldToNewMap
.
clone
in interface NodeInterface
clone
in class PBody
oldToNewMap
- the map filled with the old node-new node relation
ABody
nodepublic String toString()
ABody
node.
toString
in class Object
ABody
nodepublic ABlock getBlock()
ABlock
node which is the block
child of this ABody
node.
getBlock
in class PBody
ABlock
node which is the block
child of this ABody
nodepublic void setBlock(ABlock value)
block
child of this ABody
node.
setBlock
in class PBody
value
- the new block
child of this ABody
nodepublic LinkedList<Instruction> getInstructions()
instructions
field of this ABody
node.
getInstructions
in class PBody
instructions
field of this ABody
nodepublic void setInstructions(List<? extends Instruction> value)
instructions
field of this ABody
node.
setInstructions
in class PBody
value
- the new instructions
field of this ABody
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
ABody
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)
ABody
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.caseABody(ABody)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this ABody
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this ABody
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)
ABody
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 ABody
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 |