Annotation with array of Annotation

joe darcy joe.darcy at
Sat Apr 23 17:07:24 UTC 2016

On 4/23/2016 12:25 AM, Jochen Theodorou wrote:
> Hi all,
> I know the following does not compile and does right so by the JLS:
> public @interface SomeCollector {
>     Annotation[] value();
> }
> I know also that it would be easy to support with the existing 
> infrastructure. What I am looking for, is the reasoning as of why this 
> is not allowed besides what is directly in the JLS. I am trying to 
> understand the background a bit more. Has someone a pointer?

Some rationale for design decisions in the annotations facility are 
contained in the documents for JSR 175:

     JSR 175: A Metadata Facility for the Java Programming Language



More information about the core-libs-dev mailing list