type annotation reflection test spec review
steve.sides at oracle.com
Thu Mar 7 22:18:35 PST 2013
On 3/7/2013 6:03 PM, Alex Buckley wrote:
> Thanks Charlie.
> - Please add
> as a reference.
I editted the test plan to make it suitable to put here. I meant to add
that and in the process of formatting (and reformatting) left it off.
> - 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.
Sorry 'bout that. In haste I may have edited what was there down to 'TYPE'.
Charlie, I'll send you the doc version of this (I had that posted also
but ultimately just left the html), and you can make necessary edits on
> - 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?
> On 3/6/2013 10:51 PM, Charlie Wang wrote:
>> Here's type annotation reflection test spec. Please take a look. And
>> test code is coming soon.
More information about the type-annotations-dev