Package spoon.reflect.visitor
Class LexicalScopeScanner
- All Implemented Interfaces:
CtVisitor
A
CtScanner
which provides current lexical scope
of currently scanned AST node.-
Field Summary
Fields inherited from class spoon.reflect.visitor.EarlyTerminatingScanner
scannedRole
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method is called by the scanner when entering a scanned element.protected void
This method is called by the scanner when exiting a scanned element.Methods inherited from class spoon.reflect.visitor.EarlyTerminatingScanner
doScan, getListener, getResult, isTerminated, isVisitCompilationUnitContent, onElement, scan, scan, scan, scan, scan, setListener, setResult, setVisitCompilationUnitContent, terminate, visitCtCompilationUnit
Methods inherited from class spoon.reflect.visitor.CtScanner
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 Details
-
LexicalScopeScanner
public LexicalScopeScanner()
-
-
Method Details
-
enter
Description copied from class:CtScanner
This method is called by the scanner when entering a scanned element. To be overridden to implement specific scanners. -
exit
Description copied from class:CtScanner
This method is called by the scanner when exiting a scanned element. To be overridden to implement specific scanners. -
getCurrentLexicalScope
- Returns:
LexicalScope
of actually scanned element. TheLexicalScope.forEachElementByName(String, java.util.function.Function)
can be used to get allCtElement
s which are mapped to that simple name
-