Comments on preliminary javax.lang.model changes for JSR 308

Joe Darcy joe.darcy at oracle.com
Sun Feb 17 12:48:44 PST 2013


PS To summarize this feedback, whether or not a type is annotated should 
be a "has-a" rather than "is-a" relationship.

Cheers,

-Joe

On 2/15/2013 5:06 PM, Joseph Darcy wrote:
> Greetings JSR 308 experts,
>
> The initial push of the JSR 308 changes into JDK 8 [1], included 
> various changes to the javax.lang.model API
>
> 1) New type javax.lang.model.type.AnnotatedType
> 2) New method ExecutableType.getReceiverType
> 3) New enum constant TypeKind.ANNOTATED
> 4) New method on visitor interface TypeVisitor.visitAnnotated
> 5) Update of AbstractTypeVisitor6 with an implementation of 
> visitAnnotated.
> 6) Several new methods in javax.lang.model.util.Types
>
> Given the direction being taken for javax.lang.model support for type 
> annotations [2], with the possible exception of 2) and some of 6), the 
> rest of these changes should be reverted.  The the proposed design in 
> [2], all types are potentially annotated so classifying types in the 
> API as annotated or not is not a helpful distinction.
>
> Thanks,
>
> -Joe
> JSR 269 Maintenance Lead
>
> [1] 8006775: JSR 308: Compiler changes in JDK8,
> http://hg.openjdk.java.net/jdk8/tl/langtools/rev/71f35e4b93a5
>
> [2] 
> http://mail.openjdk.java.net/pipermail/type-annotations-spec-experts/2013-February/000064.html



More information about the type-annotations-spec-comments mailing list