|
||||||||||
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.ADerefExp
public final class ADerefExp
ADerefExp
represents the deref
alternative of the exp
production in the AST.
Constructor Summary | |
---|---|
ADerefExp()
Creates a new ADerefExp node with no children. |
|
ADerefExp(TStar _token_,
PExp _exp_)
Creates a new ADerefExp node with the given nodes as children. |
|
ADerefExp(TStar _token_,
PExp _exp_,
Type _type_)
Creates a new ADerefExp node with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseADerefExp(ADerefExp) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this ADerefExp
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this ADerefExp node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this ADerefExp node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
ADerefExp |
clone()
Returns a deep clone of this ADerefExp node. |
|
ADerefExp |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this ADerefExp 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 ADerefExp node that are
accepted by the NodeFilter filter to collection . |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this ADerefExp node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
PExp |
getExp()
Returns the PExp node which is the exp child of this ADerefExp node. |
|
TStar |
getToken()
Returns the TStar node which is the token child of this ADerefExp node. |
|
Type |
getType()
Returns the type field of this ADerefExp node. |
|
EExp |
kindPExp()
Returns the EExp corresponding to the
type of this PExp node. |
|
void |
setExp(PExp value)
Sets the exp child of this ADerefExp node. |
|
void |
setToken(TStar value)
Sets the token child of this ADerefExp node. |
|
void |
setType(Type value)
Sets the type field of this ADerefExp node. |
|
String |
toString()
Returns a textual representation of this ADerefExp 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 ADerefExp()
ADerefExp
node with no children.
public ADerefExp(TStar _token_, PExp _exp_)
ADerefExp
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_token_
- the TStar
node for the Token
child of this ADerefExp
node_exp_
- the PExp
node for the Exp
child of this ADerefExp
nodepublic ADerefExp(TStar _token_, PExp _exp_, Type _type_)
ADerefExp
node with the given nodes as children.
The basic child nodes are removed from their previous parents.
_token_
- the TStar
node for the Token
child of this ADerefExp
node_exp_
- the PExp
node for the Exp
child of this ADerefExp
node_type_
- the Type
child of this ADerefExp
nodeMethod Detail |
---|
public ADerefExp clone()
ADerefExp
node.
clone
in interface NodeInterface
clone
in class PExp
ADerefExp
nodepublic ADerefExp clone(Map<Node,Node> oldToNewMap)
ADerefExp
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
ADerefExp
nodepublic String toString()
ADerefExp
node.
toString
in class Object
ADerefExp
nodepublic EExp kindPExp()
EExp
corresponding to the
type of this PExp
node.
kindPExp
in class PExp
EExp
for this nodepublic TStar getToken()
TStar
node which is the token
child of this ADerefExp
node.
TStar
node which is the token
child of this ADerefExp
nodepublic void setToken(TStar value)
token
child of this ADerefExp
node.
value
- the new token
child of this ADerefExp
nodepublic PExp getExp()
PExp
node which is the exp
child of this ADerefExp
node.
PExp
node which is the exp
child of this ADerefExp
nodepublic void setExp(PExp value)
exp
child of this ADerefExp
node.
value
- the new exp
child of this ADerefExp
nodepublic Type getType()
type
field of this ADerefExp
node.
getType
in interface ITyped
getType
in class PExp
type
field of this ADerefExp
nodepublic void setType(Type value)
type
field of this ADerefExp
node.
setType
in interface ITyped
setType
in class PExp
value
- the new type
field of this ADerefExp
nodepublic <T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
ADerefExp
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)
ADerefExp
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.caseADerefExp(ADerefExp)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this ADerefExp
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this ADerefExp
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)
ADerefExp
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 ADerefExp
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 |