Affects Version/s: V1Alpha
Fix Version/s: None
TPAP currently uses the following loop:
for ( all annotations that a processor is registered to handle )
get collection of decls annotated with a particular annotation
check that decl
This means that a decl could be checked multiple times, if it has multiple interesting annotations on it. Furthermore, each check pass currently has no context being passed wrt what annotation the TPAP considers interesting (the "check that decl" call above doesn't pass the annotation in question). We should add that to the signature.
This labelled as task-level work because it could cause some significant ripple effects on downstream processors.
A workaround for this that we've been using has been to have annotation processors register for a minimal set of annotations, and internally do explicit checks for other annotations. This makes it difficult to be comprehensive about robustly covering error cases for annotation usage (since situations where we didn't explicitly expect to see an annotation will probably just be ignored), and it also means apt reports a ton of annotations as not having any processors registered for it. See http://issues.apache.org/jira/browse/BEEHIVE-385.