Package spoon.experimental
Class SpoonifierVisitor
java.lang.Object
spoon.reflect.visitor.CtScanner
spoon.experimental.SpoonifierVisitor
- All Implemented Interfaces:
CtVisitor
Visitor that generates factory calls to recreate the AST visited.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructor for SpoonifierVisitor.SpoonifierVisitor(boolean printTabs)
-
Method Summary
Methods inherited from class spoon.reflect.visitor.CtScanner
scan, scan, scan, scan, scan, scan, scan, visitCtAnnotation, visitCtAnnotationFieldAccess, visitCtAnnotationMethod, visitCtAnnotationType, visitCtAnonymousExecutable, visitCtArrayRead, visitCtArrayTypeReference, visitCtArrayWrite, visitCtAssert, visitCtAssignment, visitCtBinaryOperator, visitCtBlock, visitCtBreak, visitCtCase, visitCtCatch, visitCtCatchVariable, visitCtCatchVariableReference, visitCtClass, visitCtCodeSnippetExpression, visitCtCodeSnippetStatement, visitCtComment, visitCtCompilationUnit, 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
-
Field Details
-
printTabs
public boolean printTabs
-
-
Constructor Details
-
SpoonifierVisitor
public SpoonifierVisitor()Default constructor for SpoonifierVisitor. Print with tabulations. -
SpoonifierVisitor
public SpoonifierVisitor(boolean printTabs)- Parameters:
printTabs
- if set to true, tabulations will be printed to match the structure of the AST constructed.
-
-
Method Details
-
getResult
- Returns:
- the generated code. Note that this code assume a variable Factory factory is already aessible in the scope.
-
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.
-