|
||||||||||
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.ADeclStm
public final class ADeclStm
ADeclStm
represents the decl
alternative of the stm
production in the AST.
Constructor Summary | |
---|---|
ADeclStm()
Creates a new ADeclStm node with no children. |
|
ADeclStm(TVar _token_,
List<? extends ALocalDecl> _decl_)
Creates a new ADeclStm node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseADeclStm(ADeclStm) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this ADeclStm
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this ADeclStm node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this ADeclStm node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
ADeclStm |
clone()
Returns a deep clone of this ADeclStm node. |
|
ADeclStm |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this ADeclStm 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 ADeclStm node that are
accepted by the NodeFilter filter to collection . |
|
LinkedList<ALocalDecl> |
getDecl()
Returns the possibly empty list of ALocalDecl nodes that are the decl children of this ADeclStm node. |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this ADeclStm node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
TVar |
getToken()
Returns the TVar node which is the token child of this ADeclStm node. |
|
EStm |
kindPStm()
Returns the EStm corresponding to the
type of this PStm node. |
|
void |
setDecl(List<? extends ALocalDecl> value)
Sets the decl children of this ADeclStm node. |
|
void |
setToken(TVar value)
Sets the token child of this ADeclStm node. |
|
String |
toString()
Returns a textual representation of this ADeclStm 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 ADeclStm()
ADeclStm
node with no children.
public ADeclStm(TVar _token_, List<? extends ALocalDecl> _decl_)
ADeclStm
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_token_
- the TVar
node for the Token
child of this ADeclStm
node_decl_
- the list of ALocalDecl
nodes for the Decl
children of this ADeclStm
nodeMethod Detail |
---|
public ADeclStm clone()
ADeclStm
node.
clone
in interface NodeInterface
clone
in class PStm
ADeclStm
nodepublic ADeclStm clone(Map<Node,Node> oldToNewMap)
ADeclStm
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
ADeclStm
nodepublic String toString()
ADeclStm
node.
toString
in class Object
ADeclStm
nodepublic EStm kindPStm()
EStm
corresponding to the
type of this PStm
node.
kindPStm
in class PStm
EStm
for this nodepublic TVar getToken()
TVar
node which is the token
child of this ADeclStm
node.
getToken
in class PStm
TVar
node which is the token
child of this ADeclStm
nodepublic void setToken(TVar value)
token
child of this ADeclStm
node.
value
- the new token
child of this ADeclStm
nodepublic LinkedList<ALocalDecl> getDecl()
ALocalDecl
nodes that are the decl
children of this ADeclStm
node.
ALocalDecl
nodes that are the decl
children of this ADeclStm
nodepublic void setDecl(List<? extends ALocalDecl> value)
decl
children of this ADeclStm
node.
value
- the new decl
children of this ADeclStm
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
ADeclStm
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)
ADeclStm
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.caseADeclStm(ADeclStm)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this ADeclStm
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this ADeclStm
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)
ADeclStm
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 ADeclStm
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 |