Package spoon.reflect.visitor
Interface CtVisitor
- All Known Implementing Classes:
AstParentConsistencyChecker
,CloneBuilder
,CloneVisitor
,CtAbstractBiScanner
,CtAbstractVisitor
,CtBFSIterator
,CtBiScannerDefault
,CtDequeScanner
,CtInheritanceScanner
,CtIterator
,CtScanner
,DefaultJavaPrettyPrinter
,EarlyTerminatingScanner
,EqualsChecker
,EqualsVisitor
,HashcodeVisitor
,ImportCleaner.ImportCleanerScanner
,ImportScannerImpl
,InlinePartialEvaluator
,LexicalScopeScanner
,MatchingScanner
,MethodInvocationSearch
,ModelConsistencyChecker
,ParentExiter
,ProcessingVisitor
,ReplacementVisitor
,SignaturePrinter
,SniperJavaPrettyPrinter
,SpoonifierVisitor
,SpoonTreeBuilder
,TypeReferenceScanner
,VariableReferenceFunction.Visitor
,VariableScopeFunction.Visitor
,VisitorPartialEvaluator
public interface CtVisitor
This interface defines the visitor for the Spoon metamodel, as defined in
spoon.reflect.declaration
, spoon.reflect.code
, and
spoon.reflect.reference
. It declares a visit method for each
element of the AST.-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
voidvisitCtAnnotation(CtAnnotation<A> annotation)
Visits an annotation.<T> void
visitCtAnnotationFieldAccess(CtAnnotationFieldAccess<T> annotationFieldAccess)
Visits a field of an annotation.<T> void
visitCtAnnotationMethod(CtAnnotationMethod<T> annotationMethod)
Visits an annotation method declaration.<A extends Annotation>
voidvisitCtAnnotationType(CtAnnotationType<A> annotationType)
Visits an annotation type declaration.void
visitCtAnonymousExecutable(CtAnonymousExecutable anonymousExec)
Visits an anonymous executable.<T> void
visitCtArrayRead(CtArrayRead<T> arrayRead)
Visits an array read access.<T> void
visitCtArrayTypeReference(CtArrayTypeReference<T> reference)
Visits a reference to an array type.<T> void
visitCtArrayWrite(CtArrayWrite<T> arrayWrite)
Visits an array write access.<T> void
visitCtAssert(CtAssert<T> asserted)
Visits an assert.<T, A extends T>
voidvisitCtAssignment(CtAssignment<T,A> assignement)
Visits an assignment.<T> void
visitCtBinaryOperator(CtBinaryOperator<T> operator)
Visits a binary operator.<R> void
visitCtBlock(CtBlock<R> block)
Visits a block of code.void
visitCtBreak(CtBreak breakStatement)
Visits abreak
statement.<S> void
visitCtCase(CtCase<S> caseStatement)
Visits acase
clause.void
visitCtCatch(CtCatch catchBlock)
Visits acatch
clause.<T> void
visitCtCatchVariable(CtCatchVariable<T> catchVariable)
Visits a catch variable declaration.<T> void
visitCtCatchVariableReference(CtCatchVariableReference<T> reference)
Visits a reference to a catch variable.<T> void
visitCtClass(CtClass<T> ctClass)
Visits a class declaration.<T> void
visitCtCodeSnippetExpression(CtCodeSnippetExpression<T> expression)
Visits a code snippet expression.void
visitCtCodeSnippetStatement(CtCodeSnippetStatement statement)
Visits a code snippet statement.void
visitCtComment(CtComment comment)
Visits a commentvoid
visitCtCompilationUnit(CtCompilationUnit compilationUnit)
Visits a compilation unit<T> void
visitCtConditional(CtConditional<T> conditional)
Visits a conditional expression<T> void
visitCtConstructor(CtConstructor<T> c)
Visits a constructor declaration.<T> void
visitCtConstructorCall(CtConstructorCall<T> ctConstructorCall)
Visits a call to a constructor.void
visitCtContinue(CtContinue continueStatement)
Visits acontinue
statement.void
Visits ado
loop.<T extends Enum<?>>
voidvisitCtEnum(CtEnum<T> ctEnum)
Visits an enumeration declaration.<T> void
visitCtEnumValue(CtEnumValue<T> enumValue)
Visits an enum value declaration.<T> void
visitCtExecutableReference(CtExecutableReference<T> reference)
Visits a reference to an executable.<T, E extends CtExpression<?>>
voidvisitCtExecutableReferenceExpression(CtExecutableReferenceExpression<T,E> expression)
Visits a reference to an executable.<T> void
visitCtField(CtField<T> f)
Visits a field declaration.<T> void
visitCtFieldRead(CtFieldRead<T> fieldRead)
Visits a field read access.<T> void
visitCtFieldReference(CtFieldReference<T> reference)
Visits a reference to a field.<T> void
visitCtFieldWrite(CtFieldWrite<T> fieldWrite)
Visits a field write access.void
visitCtFor(CtFor forLoop)
Visits afor
loop.void
visitCtForEach(CtForEach foreach)
Visits an enhancedfor
loop.void
Visits anif
statement.void
visitCtImport(CtImport ctImport)
Visits an import declaration<T> void
visitCtInterface(CtInterface<T> intrface)
Visits an interface declaration.<T> void
visitCtIntersectionTypeReference(CtIntersectionTypeReference<T> reference)
Visits an intersection type.<T> void
visitCtInvocation(CtInvocation<T> invocation)
Visits an executable invocation.void
visitCtJavaDoc(CtJavaDoc comment)
Visits a javadoc commentvoid
visitCtJavaDocTag(CtJavaDocTag docTag)
Visits a javadoc tag<T> void
visitCtLambda(CtLambda<T> lambda)
Visits an anonymous method construction.<T> void
visitCtLiteral(CtLiteral<T> literal)
Visits a literal expression.<T> void
visitCtLocalVariable(CtLocalVariable<T> localVariable)
Visits a local variable declaration.<T> void
visitCtLocalVariableReference(CtLocalVariableReference<T> reference)
Visits a reference to a local variable.<T> void
visitCtMethod(CtMethod<T> m)
Visits a method declaration.void
visitCtModule(CtModule module)
Visits a module declarationvoid
visitCtModuleReference(CtModuleReference moduleReference)
Visits a module referencevoid
visitCtModuleRequirement(CtModuleRequirement moduleRequirement)
Visits a "require" directive in a module declaration.<T> void
visitCtNewArray(CtNewArray<T> newArray)
Visits an array construction.<T> void
visitCtNewClass(CtNewClass<T> newClass)
Visits an anonymous class construction.<T, A extends T>
voidvisitCtOperatorAssignment(CtOperatorAssignment<T,A> assignment)
Visits an operator assignment.void
visitCtPackage(CtPackage ctPackage)
Visits a package declaration.void
visitCtPackageDeclaration(CtPackageDeclaration packageDeclaration)
Visits a package declarationvoid
visitCtPackageExport(CtPackageExport moduleExport)
Visits a package export in a module declaration.void
visitCtPackageReference(CtPackageReference reference)
Visits a reference to a package.<T> void
visitCtParameter(CtParameter<T> parameter)
Visits a parameter declaration.<T> void
visitCtParameterReference(CtParameterReference<T> reference)
Visits a reference to a parameter.void
visitCtProvidedService(CtProvidedService moduleProvidedService)
Visits a "provides" directive in a module declaration.void
visitCtRecord(CtRecord recordType)
Visits a record.void
visitCtRecordComponent(CtRecordComponent recordComponent)
Visits a record component.<R> void
visitCtReturn(CtReturn<R> returnStatement)
Visits areturn
statement.<R> void
visitCtStatementList(CtStatementList statements)
Visits a statement list.<T> void
visitCtSuperAccess(CtSuperAccess<T> f)
Visits an access to a super invocation.<S> void
visitCtSwitch(CtSwitch<S> switchStatement)
Visits aswitch
statement.<T, S> void
visitCtSwitchExpression(CtSwitchExpression<T,S> switchExpression)
Visits aswitch
expression.void
visitCtSynchronized(CtSynchronized synchro)
Visits asynchronized
modifier.void
visitCtTextBlock(CtTextBlock ctTextBlock)
Visits a literal TextBlock string.<T> void
visitCtThisAccess(CtThisAccess<T> thisAccess)
Visits a this access.void
visitCtThrow(CtThrow throwStatement)
Visits athrow
statement.void
visitCtTry(CtTry tryBlock)
Visits atry
statement.void
visitCtTryWithResource(CtTryWithResource tryWithResource)
Visits atry
with resource statement.<T> void
visitCtTypeAccess(CtTypeAccess<T> typeAccess)
Visits a type access.void
visitCtTypeMemberWildcardImportReference(CtTypeMemberWildcardImportReference wildcardReference)
Visits an import wildcard static type member referencevoid
visitCtTypeParameter(CtTypeParameter typeParameter)
Visits a type parameter declaration.void
Visits a reference to a type parameter.void
visitCtTypePattern(CtTypePattern pattern)
Visits a pattern.<T> void
visitCtTypeReference(CtTypeReference<T> reference)
Visits a reference to a type.<T> void
visitCtUnaryOperator(CtUnaryOperator<T> operator)
Visits a unary operator.<T> void
visitCtUnboundVariableReference(CtUnboundVariableReference<T> reference)
Visits a reference to an unbound fieldvoid
visitCtUsedService(CtUsedService usedService)
Visits a "uses" directive in a module declaration.<T> void
visitCtVariableRead(CtVariableRead<T> variableRead)
Visits a variable read access.<T> void
visitCtVariableWrite(CtVariableWrite<T> variableWrite)
Visits a variable write access.void
visitCtWhile(CtWhile whileLoop)
Visits awhile
loop.void
visitCtWildcardReference(CtWildcardReference wildcardReference)
Visits a reference to a wildcard.void
visitCtYieldStatement(CtYieldStatement statement)
Visits a yield statement.
-
Method Details
-
visitCtAnnotation
Visits an annotation. -
visitCtCodeSnippetExpression
Visits a code snippet expression. -
visitCtCodeSnippetStatement
Visits a code snippet statement. -
visitCtAnnotationType
Visits an annotation type declaration. -
visitCtAnonymousExecutable
Visits an anonymous executable. -
visitCtArrayRead
Visits an array read access. -
visitCtArrayWrite
Visits an array write access. -
visitCtArrayTypeReference
Visits a reference to an array type. -
visitCtAssert
Visits an assert. -
visitCtAssignment
Visits an assignment. -
visitCtBinaryOperator
Visits a binary operator. -
visitCtBlock
Visits a block of code. -
visitCtBreak
Visits abreak
statement. -
visitCtCase
Visits acase
clause. -
visitCtCatch
Visits acatch
clause. -
visitCtClass
Visits a class declaration. -
visitCtTypeParameter
Visits a type parameter declaration. -
visitCtConditional
Visits a conditional expression -
visitCtConstructor
Visits a constructor declaration. -
visitCtContinue
Visits acontinue
statement. -
visitCtDo
Visits ado
loop. -
visitCtEnum
Visits an enumeration declaration. -
visitCtExecutableReference
Visits a reference to an executable. -
visitCtField
Visits a field declaration. -
visitCtEnumValue
Visits an enum value declaration. -
visitCtThisAccess
Visits a this access. -
visitCtFieldReference
Visits a reference to a field. -
visitCtUnboundVariableReference
Visits a reference to an unbound field -
visitCtFor
Visits afor
loop. -
visitCtForEach
Visits an enhancedfor
loop. -
visitCtIf
Visits anif
statement. -
visitCtInterface
Visits an interface declaration. -
visitCtInvocation
Visits an executable invocation. -
visitCtLiteral
Visits a literal expression. -
visitCtTextBlock
Visits a literal TextBlock string. -
visitCtLocalVariable
Visits a local variable declaration. -
visitCtLocalVariableReference
Visits a reference to a local variable. -
visitCtCatchVariable
Visits a catch variable declaration. -
visitCtCatchVariableReference
Visits a reference to a catch variable. -
visitCtMethod
Visits a method declaration. -
visitCtAnnotationMethod
Visits an annotation method declaration. -
visitCtNewArray
Visits an array construction. -
visitCtConstructorCall
Visits a call to a constructor. -
visitCtNewClass
Visits an anonymous class construction. -
visitCtLambda
Visits an anonymous method construction. -
visitCtExecutableReferenceExpression
<T, E extends CtExpression<?>> void visitCtExecutableReferenceExpression(CtExecutableReferenceExpression<T,E> expression)Visits a reference to an executable. -
visitCtOperatorAssignment
Visits an operator assignment. -
visitCtPackage
Visits a package declaration. -
visitCtPackageReference
Visits a reference to a package. -
visitCtParameter
Visits a parameter declaration. -
visitCtParameterReference
Visits a reference to a parameter. -
visitCtReturn
Visits areturn
statement. -
visitCtStatementList
Visits a statement list. -
visitCtSwitch
Visits aswitch
statement. -
visitCtSwitchExpression
Visits aswitch
expression. -
visitCtSynchronized
Visits asynchronized
modifier. -
visitCtThrow
Visits athrow
statement. -
visitCtTry
Visits atry
statement. -
visitCtTryWithResource
Visits atry
with resource statement. -
visitCtTypeParameterReference
Visits a reference to a type parameter. -
visitCtWildcardReference
Visits a reference to a wildcard. -
visitCtIntersectionTypeReference
Visits an intersection type. -
visitCtTypeReference
Visits a reference to a type. -
visitCtTypeAccess
Visits a type access. -
visitCtUnaryOperator
Visits a unary operator. -
visitCtVariableRead
Visits a variable read access. -
visitCtVariableWrite
Visits a variable write access. -
visitCtWhile
Visits awhile
loop. -
visitCtAnnotationFieldAccess
Visits a field of an annotation. -
visitCtFieldRead
Visits a field read access. -
visitCtFieldWrite
Visits a field write access. -
visitCtSuperAccess
Visits an access to a super invocation. -
visitCtComment
Visits a comment -
visitCtJavaDoc
Visits a javadoc comment -
visitCtJavaDocTag
Visits a javadoc tag -
visitCtImport
Visits an import declaration -
visitCtModule
Visits a module declaration -
visitCtModuleReference
Visits a module reference -
visitCtPackageExport
Visits a package export in a module declaration. -
visitCtModuleRequirement
Visits a "require" directive in a module declaration. -
visitCtProvidedService
Visits a "provides" directive in a module declaration. -
visitCtUsedService
Visits a "uses" directive in a module declaration. -
visitCtCompilationUnit
Visits a compilation unit -
visitCtPackageDeclaration
Visits a package declaration -
visitCtTypeMemberWildcardImportReference
void visitCtTypeMemberWildcardImportReference(CtTypeMemberWildcardImportReference wildcardReference)Visits an import wildcard static type member reference -
visitCtYieldStatement
Visits a yield statement. -
visitCtTypePattern
Visits a pattern.- Parameters:
pattern
- the pattern to visit.
-
visitCtRecord
Visits a record.- Parameters:
recordType
- the record to visit.
-
visitCtRecordComponent
Visits a record component.- Parameters:
recordComponent
- the record component to visit.
-