Package spoon.pattern.internal.node
Class ListOfNodes
java.lang.Object
spoon.pattern.internal.node.AbstractNode
spoon.pattern.internal.node.ListOfNodes
-
Field Summary
FieldsFields inherited from interface spoon.pattern.internal.node.RootNode
MATCH_ALL, MATCH_PART -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidforEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)Calls consumer for each pair of parameter definition (ParameterInfo) andRootNode, which uses it<T> voidgenerateTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters)Generates zero, one or more target depending on kind of thisRootNode, expected `result` and input `parameters`getNodes()matchTargets(TobeMatched targets, Matchers nextMatchers)booleanreplaceNode(RootNode oldNode, RootNode newNode)Call it to modify Pattern structure.Methods inherited from class spoon.pattern.internal.node.AbstractNode
isSimplifyGenerated, setSimplifyGenerated, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface spoon.pattern.internal.node.RootNode
matchAllWith
-
Field Details
-
nodes
-
-
Constructor Details
-
ListOfNodes
-
-
Method Details
-
forEachParameterInfo
Description copied from interface:RootNodeCalls consumer for each pair of parameter definition (ParameterInfo) andRootNode, which uses it- Parameters:
consumer- the receiver of pairs ofParameterInfoandRootNode
-
generateTargets
public <T> void generateTargets(DefaultGenerator generator, ResultHolder<T> result, ImmutableMap parameters)Description copied from interface:RootNodeGenerates zero, one or more target depending on kind of thisRootNode, expected `result` and input `parameters`- Parameters:
generator-Generatorwhich drives generation processresult- holder for the generated objectsparameters- aImmutableMapholding parameters
-
matchTargets
- Parameters:
targets- to be matched target nodes and input parametersnextMatchers- Chain of matchers which has to be processed after thisRootNode- Returns:
- new parameters and container with remaining targets
-
replaceNode
Description copied from interface:RootNodeCall it to modify Pattern structure. It is actually called mainly by PatternBuilder. TODO: May be we can move this method into some internal interface? -
getNodes
- Returns:
ListofRootNodes of thisListOfNodes
-