|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeInterface
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Applies the Analysis visitor to this node. |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this node to the
Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for answer by applying this node with the
question to the QuestionAnswer visitor. |
|
void |
checkOptionalInvariant()
|
|
Node |
clone()
|
|
Node |
clone(Map<Node,Node> oldToNewMap)
|
|
|
getAncestor(Class<T> classType)
Returns the nearest ancestor of this node (including itself) which is a subclass of classType . |
|
|
getAncestor(Class<T> classType,
Class<? extends NodeInterface> guardClass)
Returns the nearest ancestor of this node (including itself) which is a subclass of classType . |
|
|
getAncestor(NodeFilter<T> filter)
Returns the nearest ancestor of this node (including itself) which is accepted by the NodeFilter filter . |
|
|
getChildren(Class<T> classType)
Returns the collection of children to this node which are subtypes of classType . |
|
|
getChildren(Collection<T> collection,
NodeFilter<T> filter)
Adds all children of this NodeInterface node that are
accepted by the NodeFilter filter to collection . |
|
|
getChildren(NodeFilter<T> filter)
Returns the collection of children to this node which are accepted by the NodeFilter filter . |
|
|
getDescendants(Class<T> classType)
Returns the collection of descendants to this node (including itself) which are subtypes of classType . |
|
|
getDescendants(Class<T> classType,
Class<? extends NodeInterface> guardClass)
Returns the collection of descendants to this node (including itself) which are subtypes of classType . |
|
|
getDescendants(Collection<T> collection,
NodeFilter<T> filter)
Adds all descendants of this NodeInterface node (including the node itself) that are
accepted by the NodeFilter filter to collection . |
|
|
getDescendants(NodeFilter<T> filter)
Returns the collection of descendants to this node (including the node itself) which are accepted by the NodeFilter filter . |
|
boolean |
isOptionalInvariant()
|
|
Node |
parent()
Returns the parent node of this node. |
|
void |
replaceBy(Node node)
Replaces this node by node in the AST. |
|
void |
setOptionalInvariant(boolean value)
|
Method Detail |
---|
Node clone()
Node clone(Map<Node,Node> oldToNewMap)
Node parent()
void replaceBy(Node node)
node
in the AST. If this node has no parent
node, this results in a NullPointerException
.
The replacing node
is removed from its previous parent.
node
- the node replacing this node in the AST<T extends NodeInterface> T getAncestor(NodeFilter<T> filter)
NodeFilter
filter
.
Traversal is stopped if the node is guarded by
the NodeFilter
filter
.
filter
- the NodeFilter
used
<T extends NodeInterface> T getAncestor(Class<T> classType)
classType
.
classType
- the superclass used
<T extends NodeInterface> T getAncestor(Class<T> classType, Class<? extends NodeInterface> guardClass)
classType
. Traversal is stopped
if a subclass of guardClass
is found.
classType
- the superclass used for filteringguardClass
- the superclass used for guarding
<T extends NodeInterface> void getDescendants(Collection<T> collection, NodeFilter<T> filter)
NodeInterface
node (including the node itself) that are
accepted by the NodeFilter
filter
to collection
.
collection
- the collection to which the descendants are addedfilter
- the NodeFilter
used<T extends NodeInterface> Collection<T> getDescendants(NodeFilter<T> filter)
NodeFilter
filter
.
Descandants of nodes which are guarded by the NodeFilter
filter
are not included.
filter
- the NodeFilter
used
<T extends NodeInterface> Collection<T> getDescendants(Class<T> classType)
classType
.
classType
- the supertype for all collected descendants
<T extends NodeInterface> Collection<T> getDescendants(Class<T> classType, Class<? extends NodeInterface> guardClass)
classType
. Descendants of subtypes of
guardClass
are not included.
classType
- the supertype for all collected descendants
<T extends NodeInterface> void getChildren(Collection<T> collection, NodeFilter<T> filter)
NodeInterface
node that are
accepted by the NodeFilter
filter
to collection
.
collection
- the collection to which the children are addedfilter
- the NodeFilter
used<T extends NodeInterface> List<T> getChildren(NodeFilter<T> filter)
NodeFilter
filter
.
filter
- the NodeFilter
used
<T extends NodeInterface> List<T> getChildren(Class<T> classType)
classType
.
classType
- the supertype for all collected children
void apply(Analysis caller)
Analysis
visitor to this node.
caller
- the Analysis
to which this node is applied<A> A apply(Answer<A> caller)
caller
by applying this node to the
Answer
visitor.
caller
- the Answer
to which this node is applied
caller
<Q> void apply(Question<Q> caller, Q question)
Question
visitor caller
.
caller
- the Question
to which this node is appliedquestion
- the question provided to caller
<Q,A> A apply(QuestionAnswer<Q,A> caller, Q question)
answer
by applying this node with the
question
to the QuestionAnswer
visitor.
caller
- the QuestionAnswer
to which this node is appliedquestion
- the question provided to answer
answer
boolean isOptionalInvariant()
void setOptionalInvariant(boolean value)
void checkOptionalInvariant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |