Package spoon.pattern.internal.matcher
Class MatchingScanner
- java.lang.Object
-
- spoon.reflect.visitor.CtScanner
-
- spoon.reflect.visitor.EarlyTerminatingScanner<Void>
-
- spoon.pattern.internal.matcher.MatchingScanner
-
- All Implemented Interfaces:
CtVisitor
public class MatchingScanner extends EarlyTerminatingScanner<Void>
Represents a Match of TemplateMatcher
-
-
Field Summary
-
Fields inherited from class spoon.reflect.visitor.EarlyTerminatingScanner
scannedRole
-
-
Constructor Summary
Constructors Constructor Description MatchingScanner(ListOfNodes pattern, CtConsumer<? super Match> matchConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
scan(CtRole role, Collection<? extends CtElement> elements)
Generically scans a collection of meta-model elements.void
scan(CtRole role, Map<String,? extends CtElement> elements)
Generically scans a Map of meta-model elements.void
scan(CtRole role, CtElement element)
Generically scans a meta-model element.-
Methods inherited from class spoon.reflect.visitor.EarlyTerminatingScanner
doScan, getListener, getResult, isTerminated, isVisitCompilationUnitContent, onElement, scan, scan, setListener, setResult, setVisitCompilationUnitContent, terminate, visitCtCompilationUnit
-
Methods inherited from class spoon.reflect.visitor.CtScanner
enter, exit, scan, scan, visitCtAnnotation, visitCtAnnotationFieldAccess, visitCtAnnotationMethod, visitCtAnnotationType, visitCtAnonymousExecutable, visitCtArrayRead, visitCtArrayTypeReference, visitCtArrayWrite, visitCtAssert, visitCtAssignment, visitCtBinaryOperator, visitCtBlock, visitCtBreak, visitCtCase, visitCtCatch, visitCtCatchVariable, visitCtCatchVariableReference, visitCtClass, visitCtCodeSnippetExpression, visitCtCodeSnippetStatement, visitCtComment, visitCtConditional, visitCtConstructor, visitCtConstructorCall, visitCtContinue, visitCtDo, visitCtEnum, visitCtEnumValue, visitCtExecutableReference, visitCtExecutableReferenceExpression, visitCtField, visitCtFieldRead, visitCtFieldReference, visitCtFieldWrite, visitCtFor, visitCtForEach, visitCtIf, visitCtImport, visitCtInterface, visitCtIntersectionTypeReference, visitCtInvocation, visitCtJavaDoc, visitCtJavaDocTag, visitCtLambda, visitCtLiteral, visitCtLocalVariable, visitCtLocalVariableReference, visitCtMethod, visitCtModule, visitCtModuleReference, visitCtModuleRequirement, visitCtNewArray, visitCtNewClass, visitCtOperatorAssignment, visitCtPackage, visitCtPackageDeclaration, visitCtPackageExport, visitCtPackageReference, visitCtParameter, visitCtParameterReference, visitCtProvidedService, visitCtRecord, visitCtRecordComponent, visitCtReturn, visitCtStatementList, visitCtSuperAccess, visitCtSwitch, visitCtSwitchExpression, visitCtSynchronized, visitCtTextBlock, visitCtThisAccess, visitCtThrow, visitCtTry, visitCtTryWithResource, visitCtTypeAccess, visitCtTypeMemberWildcardImportReference, visitCtTypeParameter, visitCtTypeParameterReference, visitCtTypePattern, visitCtTypeReference, visitCtUnaryOperator, visitCtUnboundVariableReference, visitCtUsedService, visitCtVariableRead, visitCtVariableWrite, visitCtWhile, visitCtWildcardReference, visitCtYieldStatement
-
-
-
-
Constructor Detail
-
MatchingScanner
public MatchingScanner(ListOfNodes pattern, CtConsumer<? super Match> matchConsumer)
-
-
Method Detail
-
scan
public void scan(CtRole role, CtElement element)
Description copied from class:CtScanner
Generically scans a meta-model element.- Overrides:
scan
in classEarlyTerminatingScanner<Void>
- Parameters:
role
- Role of the element in its parentelement
- An element to scan
-
scan
public void scan(CtRole role, Collection<? extends CtElement> elements)
Description copied from class:CtScanner
Generically scans a collection of meta-model elements.- Overrides:
scan
in classEarlyTerminatingScanner<Void>
- Parameters:
role
- Role of the collection in the parent elementelements
- A collection of elements to scan (generally sibling elements)
-
scan
public void scan(CtRole role, Map<String,? extends CtElement> elements)
Description copied from class:CtScanner
Generically scans a Map of meta-model elements.- Overrides:
scan
in classEarlyTerminatingScanner<Void>
- Parameters:
role
- Role of the map in the parent elementelements
- A map of elements to scan (generally sibling elements)
-
-