|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.node.Node
tip.node.PDecl
tip.node.ALocalDecl
public final class ALocalDecl
ALocalDecl
represents the local
alternative of the decl
production in the AST.
Constructor Summary | |
---|---|
ALocalDecl()
Creates a new ALocalDecl node with no children. |
|
ALocalDecl(TIdentifier _name_)
Creates a new ALocalDecl node with the given nodes as children. |
|
ALocalDecl(TIdentifier _name_,
boolean _declared_,
int _index_)
Creates a new ALocalDecl node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseALocalDecl(ALocalDecl) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this ALocalDecl
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this ALocalDecl node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this ALocalDecl node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
ALocalDecl |
clone()
Returns a deep clone of this ALocalDecl node. |
|
ALocalDecl |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this ALocalDecl 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 ALocalDecl node that are
accepted by the NodeFilter filter to collection . |
|
boolean |
getDeclared()
Returns the declared field of this ALocalDecl node. |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this ALocalDecl node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
int |
getIndex()
Returns the index field of this ALocalDecl node. |
|
TIdentifier |
getName()
Returns the TIdentifier node which is the name child of this ALocalDecl node. |
|
EDecl |
kindPDecl()
Returns the EDecl corresponding to the
type of this PDecl node. |
|
void |
setDeclared(boolean value)
Sets the declared field of this ALocalDecl node. |
|
void |
setIndex(int value)
Sets the index field of this ALocalDecl node. |
|
void |
setName(TIdentifier value)
Sets the name child of this ALocalDecl node. |
|
String |
toString()
Returns a textual representation of this ALocalDecl node. |
Methods inherited from class tip.node.PDecl |
---|
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 ALocalDecl()
ALocalDecl
node with no children.
public ALocalDecl(TIdentifier _name_)
ALocalDecl
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_name_
- the TIdentifier
node for the Name
child of this ALocalDecl
nodepublic ALocalDecl(TIdentifier _name_, boolean _declared_, int _index_)
ALocalDecl
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_name_
- the TIdentifier
node for the Name
child of this ALocalDecl
node_declared_
- the Declared
child of this ALocalDecl
node_index_
- the Index
child of this ALocalDecl
nodeMethod Detail |
---|
public ALocalDecl clone()
ALocalDecl
node.
clone
in interface NodeInterface
clone
in class PDecl
ALocalDecl
nodepublic ALocalDecl clone(Map<Node,Node> oldToNewMap)
ALocalDecl
node while putting all
old node-new node relations in the map oldToNewMap
.
clone
in interface NodeInterface
clone
in class PDecl
oldToNewMap
- the map filled with the old node-new node relation
ALocalDecl
nodepublic String toString()
ALocalDecl
node.
toString
in class Object
ALocalDecl
nodepublic EDecl kindPDecl()
EDecl
corresponding to the
type of this PDecl
node.
kindPDecl
in class PDecl
EDecl
for this nodepublic TIdentifier getName()
TIdentifier
node which is the name
child of this ALocalDecl
node.
getName
in class PDecl
TIdentifier
node which is the name
child of this ALocalDecl
nodepublic void setName(TIdentifier value)
name
child of this ALocalDecl
node.
setName
in class PDecl
value
- the new name
child of this ALocalDecl
nodepublic boolean getDeclared()
declared
field of this ALocalDecl
node.
declared
field of this ALocalDecl
nodepublic void setDeclared(boolean value)
declared
field of this ALocalDecl
node.
value
- the new declared
field of this ALocalDecl
nodepublic int getIndex()
index
field of this ALocalDecl
node.
getIndex
in class PDecl
index
field of this ALocalDecl
nodepublic void setIndex(int value)
index
field of this ALocalDecl
node.
setIndex
in class PDecl
value
- the new index
field of this ALocalDecl
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
ALocalDecl
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)
ALocalDecl
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.caseALocalDecl(ALocalDecl)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this ALocalDecl
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this ALocalDecl
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)
ALocalDecl
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 ALocalDecl
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 |