Some smallish comments on the current version of the spec.

Alex Buckley alex.buckley at oracle.com
Mon Nov 26 16:24:26 PST 2012


On 11/26/2012 1:55 PM, Reinier Zwitserloot wrote:
> "@ContainerFor supports the java SE platform reflection…" - This paragraph
> seems to make the point that it is important to differentiate
> @FooContainer({@Foo(1), @Foo(2)}) from just @Foo(1) @Foo(2). Why is this
> relevant? Also, later on, the examples of how JDK8 answers
> .get(Declared)Annotation queries indicates that differentiating these two
> cases in not actually important. That leaves the question of: Why is
> @ContainerFor needed in the first place?

This was discussed in August in the list's very first thread.

> "@ContainerFor" itself: While the stated aim is to be as compatible with
> existing containers as possible, there are now 2 restrictions:
>
> * The container method must be "value()".
> * All other methods must have a default.
>
> There are also many DRY violations: There's both @ContainerFor and
> @ContainedBy, _AND_ in the container annotation, the base type is repeated.
> At the very least, it is possible to eliminate both the value() restriction
> and one repetition of the base type by getting rid of @ContainerFor and
> introducing the @Container marker annotation.

This is a reasonable suggestion, though probably too late.

Alex



More information about the enhanced-metadata-spec-discuss mailing list