public static class EclipseASTVisitor.Printer extends Object implements EclipseASTVisitor
EclipseASTVisitor.Printer| Constructor and Description |
|---|
Printer(boolean printContent) |
Printer(boolean printContent,
PrintStream out,
boolean printPositions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deferUntilPostDiet() |
void |
endVisitCompilationUnit(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit) |
void |
endVisitField(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field) |
void |
endVisitInitializer(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Initializer initializer) |
void |
endVisitLocal(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local) |
void |
endVisitMethod(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method) |
void |
endVisitMethodArgument(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Argument arg,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method) |
void |
endVisitStatement(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Statement statement) |
void |
endVisitType(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type) |
void |
visitAnnotationOnField(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation) |
void |
visitAnnotationOnLocal(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation) |
void |
visitAnnotationOnMethod(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation) |
void |
visitAnnotationOnMethodArgument(org.eclipse.jdt.internal.compiler.ast.Argument arg,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation) |
void |
visitAnnotationOnType(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation) |
void |
visitCompilationUnit(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
Called at the very beginning and end.
|
void |
visitField(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
Called when visiting a field of a class.
|
void |
visitInitializer(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
Called for static and instance initializers.
|
void |
visitLocal(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
Visits a local declaration - that is, something like 'int x = 10;' on the method level.
|
void |
visitMethod(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
Called for both methods (MethodDeclaration) and constructors (ConstructorDeclaration), but not for
Clinit objects, which are a vestigial Eclipse thing that never contain anything.
|
void |
visitMethodArgument(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Argument arg,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
Visits a method argument
|
void |
visitStatement(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Statement statement)
Visits a statement that isn't any of the other visit methods (e.g.
|
void |
visitType(EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
Called when visiting a type (a class, interface, annotation, enum, etcetera).
|
public Printer(boolean printContent)
printContent - if true, bodies are printed directly, as java code,
instead of a tree listing of every AST node inside it.public Printer(boolean printContent,
PrintStream out,
boolean printPositions)
printContent - if true, bodies are printed directly, as java code,
instead of a tree listing of every AST node inside it.out - write output to this stream. You must close it yourself. flush() is called after every line.PrintStream.flush()public boolean deferUntilPostDiet()
public void visitCompilationUnit(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
EclipseASTVisitorvisitCompilationUnit in interface EclipseASTVisitorpublic void endVisitCompilationUnit(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
endVisitCompilationUnit in interface EclipseASTVisitorpublic void visitType(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
EclipseASTVisitorvisitType in interface EclipseASTVisitorpublic void visitAnnotationOnType(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
visitAnnotationOnType in interface EclipseASTVisitorpublic void endVisitType(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
endVisitType in interface EclipseASTVisitorpublic void visitInitializer(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
EclipseASTVisitorvisitInitializer in interface EclipseASTVisitorpublic void endVisitInitializer(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
endVisitInitializer in interface EclipseASTVisitorpublic void visitField(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
EclipseASTVisitorvisitField in interface EclipseASTVisitorpublic void visitAnnotationOnField(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
visitAnnotationOnField in interface EclipseASTVisitorpublic void endVisitField(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
endVisitField in interface EclipseASTVisitorpublic void visitMethod(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
EclipseASTVisitorvisitMethod in interface EclipseASTVisitorpublic void visitAnnotationOnMethod(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
visitAnnotationOnMethod in interface EclipseASTVisitorpublic void endVisitMethod(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
endVisitMethod in interface EclipseASTVisitorpublic void visitMethodArgument(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Argument arg, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
EclipseASTVisitorvisitMethodArgument in interface EclipseASTVisitorpublic void visitAnnotationOnMethodArgument(org.eclipse.jdt.internal.compiler.ast.Argument arg,
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
visitAnnotationOnMethodArgument in interface EclipseASTVisitorpublic void endVisitMethodArgument(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Argument arg, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
endVisitMethodArgument in interface EclipseASTVisitorpublic void visitLocal(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
EclipseASTVisitorvisitLocal in interface EclipseASTVisitorpublic void visitAnnotationOnLocal(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
visitAnnotationOnLocal in interface EclipseASTVisitorpublic void endVisitLocal(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
endVisitLocal in interface EclipseASTVisitorpublic void visitStatement(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Statement statement)
EclipseASTVisitorvisitStatement in interface EclipseASTVisitorpublic void endVisitStatement(EclipseNode node, org.eclipse.jdt.internal.compiler.ast.Statement statement)
endVisitStatement in interface EclipseASTVisitorCopyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.