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