aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/EclipseASTAdapter.java
diff options
context:
space:
mode:
authorRoland Praml <praml@foconis.de>2018-07-08 17:18:54 +0200
committerRoel Spilker <r.spilker@gmail.com>2018-08-20 20:46:31 +0200
commit763b384a169d3303ff82a044ec7be68be92691b1 (patch)
tree59cebf9265d1af1d7b416f7980760a5b5e10d622 /src/core/lombok/eclipse/EclipseASTAdapter.java
parentfe2117e7796e8f85b5710944bfd3efb499c87865 (diff)
downloadlombok-763b384a169d3303ff82a044ec7be68be92691b1.tar.gz
lombok-763b384a169d3303ff82a044ec7be68be92691b1.tar.bz2
lombok-763b384a169d3303ff82a044ec7be68be92691b1.zip
Do not use reflection to check if annotation is present
Diffstat (limited to 'src/core/lombok/eclipse/EclipseASTAdapter.java')
-rw-r--r--src/core/lombok/eclipse/EclipseASTAdapter.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/EclipseASTAdapter.java b/src/core/lombok/eclipse/EclipseASTAdapter.java
index 2a78c270..61807fff 100644
--- a/src/core/lombok/eclipse/EclipseASTAdapter.java
+++ b/src/core/lombok/eclipse/EclipseASTAdapter.java
@@ -36,6 +36,9 @@ import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
* has been implemented with an empty body. Override whichever methods you need.
*/
public abstract class EclipseASTAdapter implements EclipseASTVisitor {
+
+ private final boolean deferUntilPostDiet = getClass().isAnnotationPresent(DeferUntilPostDiet.class);
+
/** {@inheritDoc} */
public void visitCompilationUnit(EclipseNode top, CompilationUnitDeclaration unit) {}
@@ -98,4 +101,8 @@ public abstract class EclipseASTAdapter implements EclipseASTVisitor {
/** {@inheritDoc} */
public void endVisitStatement(EclipseNode statementNode, Statement statement) {}
+
+ public boolean isDeferUntilPostDiet() {
+ return deferUntilPostDiet ;
+ }
}