Package spoon.pattern.internal.node
Interface RepeatableMatcher
-
- All Known Subinterfaces:
PrimitiveMatcher
- All Known Implementing Classes:
ConstantNode
,ElementNode
,ForEachNode
,MapEntryNode
,ParameterNode
,StringNode
public interface RepeatableMatcher extends RootNode
-
-
Field Summary
-
Fields inherited from interface spoon.pattern.internal.node.RootNode
MATCH_ALL, MATCH_PART
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Quantifier
getMatchingStrategy()
If twoRepeatableMatcher
s in a list are matching the same element, then returnedQuantifier
defines how resolve this conflictdefault boolean
isMandatory(ImmutableMap parameters)
default boolean
isRepeatable()
boolean
isTryNextMatch(ImmutableMap parameters)
-
Methods inherited from interface spoon.pattern.internal.node.RootNode
forEachParameterInfo, generateTargets, isSimplifyGenerated, matchAllWith, matchTargets, replaceNode, setSimplifyGenerated
-
-
-
-
Method Detail
-
getMatchingStrategy
Quantifier getMatchingStrategy()
If twoRepeatableMatcher
s in a list are matching the same element, then returnedQuantifier
defines how resolve this conflict- Returns:
Quantifier
-
isRepeatable
default boolean isRepeatable()
- Returns:
- true if this matcher can be applied more then once in the same container of targets Note: even if false, it may be applied again to another container and to match EQUAL value
-
isMandatory
default boolean isMandatory(ImmutableMap parameters)
- Parameters:
parameters
- matching parameters- Returns:
- true if this ValueResolver MUST match with next target in the state defined by current `parameters`. false if match is optional
-
isTryNextMatch
boolean isTryNextMatch(ImmutableMap parameters)
- Parameters:
parameters
- matching parameters- Returns:
- true if this ValueResolver should be processed again to match next target in the state defined by current `parameters`.
-
-