diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-05-30 22:04:46 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-05-30 22:08:12 +0200 |
commit | aa8a627349bb68f376b98847b6f73c2c89e989fd (patch) | |
tree | 70df1fa6ba0f8e3c34a45d868d7f763e5b7ccbf9 /src/core/lombok/eclipse/EclipseAnnotationHandler.java | |
parent | daf84dd00ed5059710acf9f40b4663ba7fed06e0 (diff) | |
download | lombok-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/eclipse/EclipseAnnotationHandler.java')
-rw-r--r-- | src/core/lombok/eclipse/EclipseAnnotationHandler.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/EclipseAnnotationHandler.java b/src/core/lombok/eclipse/EclipseAnnotationHandler.java index aaa57603..c105f252 100644 --- a/src/core/lombok/eclipse/EclipseAnnotationHandler.java +++ b/src/core/lombok/eclipse/EclipseAnnotationHandler.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 @@ -47,8 +47,6 @@ public interface EclipseAnnotationHandler<T extends java.lang.annotation.Annotat * @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, org.eclipse.jdt.internal.compiler.ast.Annotation ast, EclipseNode annotationNode); + void handle(AnnotationValues<T> annotation, org.eclipse.jdt.internal.compiler.ast.Annotation ast, EclipseNode annotationNode); } |