Proposal: #ModuleAnnotations and #ModuleDeprecation

forax at univ-mlv.fr forax at univ-mlv.fr
Fri Jul 1 07:52:56 UTC 2016


----- Mail original -----
> De: "mark reinhold" <mark.reinhold at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: jpms-spec-experts at openjdk.java.net
> Envoyé: Jeudi 30 Juin 2016 01:37:18
> Objet: Re: Proposal: #ModuleAnnotations and #ModuleDeprecation
> 
> 2016/6/29 2:08:38 -0700, Remi Forax <forax at univ-mlv.fr>:
> > ...
> > 
> > I like both proposals, adding annotations and imports on module.
> > 
> > I disagree that those annotations should not be visible at runtime, i
> > don't see why we need a special case here, it's not complex to
> > implement because the VM already provide the hook to access to those
> > annotations at runtime, @Deprecated is an annotation visible at
> > runtime for a good reason, it allows by example to implement policy
> > like disallowing or emit a warning when calling a deprecated code at
> > runtime.
> 
> I completely agree, and the intent of the proposal is to make
> annotations on module declarations available at run time -- that's
> why it specifically mentions extending the `java.lang.reflect` API.
> 
> If there's text in the proposal that suggests otherwise then please
> point it out and I'll fix it.  Thanks.
> 
> - Mark
> 

sorry,
it's me not being able to parse "This proposal will not add support to ModuleDescriptor".

So it seems we all agree on this issue :)

I understand why you don't want to add support of annotations to ModuleDescriptor because creating a piece of metadata at runtime that will be seem as an annotation is something several people have tried to do (by example CDI/Weld) but the result is not very elegant.

Rémi


More information about the jpms-spec-experts mailing list