aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/EclipseASTVisitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/eclipse/EclipseASTVisitor.java')
-rw-r--r--src/core/lombok/eclipse/EclipseASTVisitor.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/EclipseASTVisitor.java b/src/core/lombok/eclipse/EclipseASTVisitor.java
index 0c0e2d96..7f9faf43 100644
--- a/src/core/lombok/eclipse/EclipseASTVisitor.java
+++ b/src/core/lombok/eclipse/EclipseASTVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright © 2009 Reinier Zwitserloot and Roel Spilker.
+ * Copyright © 2009-2011 Reinier Zwitserloot and Roel Spilker.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -43,6 +43,13 @@ import org.eclipse.jdt.internal.compiler.ast.TypeReference;
*/
public interface EclipseASTVisitor {
/**
+ * Return true if this handler should not be run in the diet parse phase.
+ * 'diet parse' is where method bodies aren't filled in yet. If you have a method-level annotation that modifies the contents of that method,
+ * return {@code true} here. Otherwise, return {@code false} here.
+ */
+ boolean deferUntilPostDiet();
+
+ /**
* Called at the very beginning and end.
*/
void visitCompilationUnit(EclipseNode top, CompilationUnitDeclaration unit);
@@ -112,6 +119,10 @@ public interface EclipseASTVisitor {
private int indent = 0;
private boolean printClassNames = false;
+ public boolean deferUntilPostDiet() {
+ return false;
+ }
+
/**
* @param printContent if true, bodies are printed directly, as java code,
* instead of a tree listing of every AST node inside it.