type annotation reflection test spec review
Alex Buckley
alex.buckley at oracle.com
Thu Mar 7 18:03:31 PST 2013
Thanks Charlie.
- Please add
http://mail.openjdk.java.net/pipermail/type-annotations-spec-experts/2012-September/000001.html
as a reference.
- For TYPE_USE annotations on a class declaration, there is
Class.getAnnotationsByType() to test as well as Class.getAnnotations().
Note that @Target(TYPE) should be @Target(TYPE_USE) in the final column.
- Executable should have getAnnotatedReturnType() - it was omitted by
mistake, but will be integrated very soon. (See JDK-8007808)
- Don't forget that Class/Method.getTypeParameters() now return a
TypeVariable that is an AnnotatedElement and exposes annotations on type
parameters.
- You are right to say that AnnotatedType.getType() is covered by other
tests. The same is true for its four subtypes - they can only be tested
when suitable objects are returned from
Class/Executable/Field/TypeVariable.getAnnotatedXXX(). So really, there
is no need to have any rows for AnnotatedType and its subtypes.
- The page covers the core reflection API; what about the language model
API?
Alex
On 3/6/2013 10:51 PM, Charlie Wang wrote:
> Hi,
> Here's type annotation reflection test spec. Please take a look. And
> test code is coming soon.
> http://cr.openjdk.java.net/~ssides/docs/JSR308_Type-Annotations_Reflection_Tests.html
>
>
>
> Regards,
> Charlie
>
More information about the type-annotations-dev
mailing list