aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/JavacAnnotationHandler.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-05-30 22:04:46 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-05-30 22:08:12 +0200
commitaa8a627349bb68f376b98847b6f73c2c89e989fd (patch)
tree70df1fa6ba0f8e3c34a45d868d7f763e5b7ccbf9 /src/core/lombok/javac/JavacAnnotationHandler.java
parentdaf84dd00ed5059710acf9f40b4663ba7fed06e0 (diff)
downloadlombok-aa8a627349bb68f376b98847b6f73c2c89e989fd.tar.gz
lombok-aa8a627349bb68f376b98847b6f73c2c89e989fd.tar.bz2
lombok-aa8a627349bb68f376b98847b6f73c2c89e989fd.zip
tracking if an annotation has been handled or not is now no longer done
via the LombokAST object. Instead its tracked more directly in an attempt to avoid having to write all handlers as idempotent, and just in case issue #164 is a race condition (the handled-or-not is a synchronized CAS check). This does break API for other plugins, but the fix is trivial: Just make your 'handle' method return void. That 'we won't call you again' business in the decks never quite worked right anyway. Also, you might want to call Javac.(recursive)setHandledBy when you generate nodes, now.
Diffstat (limited to 'src/core/lombok/javac/JavacAnnotationHandler.java')
-rw-r--r--src/core/lombok/javac/JavacAnnotationHandler.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/lombok/javac/JavacAnnotationHandler.java b/src/core/lombok/javac/JavacAnnotationHandler.java
index ee330ecb..3e9f6660 100644
--- a/src/core/lombok/javac/JavacAnnotationHandler.java
+++ b/src/core/lombok/javac/JavacAnnotationHandler.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
@@ -51,10 +51,8 @@ public interface JavacAnnotationHandler<T extends Annotation> {
* @param annotationNode The Lombok AST wrapper around the 'ast' parameter. You can use this object
* to travel back up the chain (something javac AST can't do) to the parent of the annotation, as well
* as access useful methods such as generating warnings or errors focused on the annotation.
- * @return {@code true} if you don't want to be called again about this annotation during this
- * compile session (you've handled it), or {@code false} to indicate you aren't done yet.
*/
- boolean handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacNode annotationNode);
+ void handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacNode annotationNode);
/**
* Return true if this handler requires resolution.