|
As it turns out, annotations on type uses are not accessible through the JSR 269 API. There is a thread on the compiler-dev list which discusses the creation of the required API: http://mail.openjdk.java.net/pipermail/compiler-dev/2014-May/008756.html.
An alternative may be to look into the "Checker Framework" and see how it could be used for our purposes. But likely that'd require the user to work with two tools (the existing AP and the Checker Framework) which seems not really desirable. It thus might make sense to wait until the required APIs have been established in JSR 269.
|