Uses of Interface
spoon.pattern.internal.node.RootNode
Package
Description
-
Uses of RootNode in spoon.pattern.internal
Modifier and TypeMethodDescriptionSubstitutionRequestProvider.getTemplateValueResolver(Object object)
Modifier and TypeMethodDescription<T> @Nullable T
DefaultGenerator.generateSingleTarget(RootNode node, ImmutableMap parameters, Class<T> expectedType)
Generates one target depending on kind of thisRootNode
, expected `expectedType` and input `parameters`<T> void
DefaultGenerator.generateTargets(RootNode node, ResultHolder<T> result, ImmutableMap parameters)
Generates zero, one or more target depending on kind of thisRootNode
, expected `result` and input `parameters`<T> List<T>
DefaultGenerator.generateTargets(RootNode node, ImmutableMap parameters, Class<T> expectedType)
Generates zero, one or more targets depending on kind of thisRootNode
, expected `expectedType` and input `parameters`<T> void
PatternPrinter.generateTargets(RootNode node, ResultHolder<T> result, ImmutableMap parameters)
-
Uses of RootNode in spoon.pattern.internal.matcher
-
Uses of RootNode in spoon.pattern.internal.node
Modifier and TypeInterfaceDescriptioninterface
Represents a kind ofRootNode
, whose AST statements are understood as pattern statements.interface
Defines API of a primitive matcher - matcher for single target objectinterface
Defines API of a repeatable matcher.Modifier and TypeClassDescriptionclass
Represents a parameterized Pattern ValueResolver, which can be used to generate a zero, one or more copies of model using provided parameters to match zero, one or more instances of model and deliver a matching parametersclass
ConstantNode<T>
Generates/Matches a copy of single template objectclass
Generates/Matches a copy of a single CtElement AST node with all it's children (whole AST tree of the root CtElement)class
Pattern node of multiple occurrences of the same model, just with different parameters.class
List ofRootNode
s.class
Represents a ValueResolver of one Map.Entryclass
Represents pattern model variable Delivers/Matches 0, 1 or more values of defined parameter.class
Delivers single String value, which is created by replacing string markers in constant String template by String value of appropriate parameter.class
List of conditional cases {code} if (a) { ...Modifier and TypeMethodDescriptionMapEntryNode.getKey()
ElementNode.getNodeOfRole(CtRole attributeRole)
ElementNode.getOrCreateNodeOfRole(CtRole role, Map<CtElement,RootNode> patternElementToSubstRequests)
MapEntryNode.getValue()
ElementNode.setNodeOfRole(CtRole role, RootNode newAttrNode)
Modifier and TypeMethodDescriptionvoid
SwitchNode.addCase(PrimitiveMatcher vrOfExpression, RootNode statement)
Adds another case into this switch statementprotected ImmutableMap
ElementNode.matchesRole(ImmutableMap parameters, CtElement target, MetamodelProperty mmField, RootNode attrNode)
boolean
ConstantNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
ElementNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
ForEachNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
ListOfNodes.replaceNode(RootNode oldNode, RootNode newNode)
boolean
MapEntryNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
ParameterNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
RootNode.replaceNode(RootNode oldNode, RootNode newNode)
Call it to modify Pattern structure.boolean
StringNode.replaceNode(RootNode oldNode, RootNode newNode)
boolean
SwitchNode.replaceNode(RootNode oldNode, RootNode newNode)
void
ForEachNode.setNestedModel(RootNode valueResolver)
ElementNode.setNodeOfRole(CtRole role, RootNode newAttrNode)
static StringNode
StringNode.setReplaceMarker(RootNode targetNode, String replaceMarker, ParameterInfo param)
Applies substring substitution to `targetNode`.Modifier and TypeMethodDescriptionstatic ListOfNodes
Same likeElementNode.create(CtElement, Map)
but withList
of elements or primitive objectsstatic ListOfNodes
Same likeElementNode.create(CtElement, Map)
but withSet
of elements or primitive objectsstatic ElementNode
Creates an implicitElementNode
, which contains all non derived attributes of `element` and all it's childrenvoid
ConstantNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
ElementNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
ForEachNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
ListOfNodes.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
MapEntryNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
ParameterNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
RootNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
Calls consumer for each pair of parameter definition (ParameterInfo
) andRootNode
, which uses itvoid
StringNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
void
SwitchNode.forEachParameterInfo(BiConsumer<ParameterInfo,RootNode> consumer)
ElementNode.getOrCreateNodeOfRole(CtRole role, Map<CtElement,RootNode> patternElementToSubstRequests)