java.lang.annotation.Generated

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.annotation.Generated

Stephen Colebourne
As per this email:
 http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
the idea was to add a new annotation `java.lang.annotation.Generated`
to replace the old problematic one.

Is it my imagination, or did this get forgotten?:
 http://download.java.net/java/jdk9/docs/api/java/lang/annotation/package-summary.html

Stephen
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Alan Bateman
On 20/09/2017 13:43, Stephen Colebourne wrote:
> As per this email:
>   http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
> the idea was to add a new annotation `java.lang.annotation.Generated`
> to replace the old problematic one.
>
> Is it my imagination, or did this get forgotten?:
>  
The discussion/review moved to core-libs-dev and compiler-dev in March,
here it is:

http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/Generated.html
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

David Lloyd
On Wed, Sep 20, 2017 at 7:49 AM, Alan Bateman <[hidden email]> wrote:

> On 20/09/2017 13:43, Stephen Colebourne wrote:
>>
>> As per this email:
>>
>> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
>> the idea was to add a new annotation `java.lang.annotation.Generated`
>> to replace the old problematic one.
>>
>> Is it my imagination, or did this get forgotten?:
>>
>
> The discussion/review moved to core-libs-dev and compiler-dev in March, here
> it is:
>
> http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/Generated.html

This would seem to presume that the @Generated annotation is only ever
produced by annotation processors...

--
- DML
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Stephen Colebourne
In reply to this post by Alan Bateman
Ouch. Thats an unpleasant result. It should have gone in `java.lang.annotation`.
Stephen

On 20 September 2017 at 13:49, Alan Bateman <[hidden email]> wrote:

> On 20/09/2017 13:43, Stephen Colebourne wrote:
>>
>> As per this email:
>>
>> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
>> the idea was to add a new annotation `java.lang.annotation.Generated`
>> to replace the old problematic one.
>>
>> Is it my imagination, or did this get forgotten?:
>>
>
> The discussion/review moved to core-libs-dev and compiler-dev in March, here
> it is:
>
> http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/Generated.html
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Roel Spilker
And possibly have retention "class"

On Sep 20, 2017 14:59, "Stephen Colebourne" <[hidden email]> wrote:

> Ouch. Thats an unpleasant result. It should have gone in
> `java.lang.annotation`.
> Stephen
>
> On 20 September 2017 at 13:49, Alan Bateman <[hidden email]>
> wrote:
> > On 20/09/2017 13:43, Stephen Colebourne wrote:
> >>
> >> As per this email:
> >>
> >> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-
> February/011365.html
> >> the idea was to add a new annotation `java.lang.annotation.Generated`
> >> to replace the old problematic one.
> >>
> >> Is it my imagination, or did this get forgotten?:
> >>
> >
> > The discussion/review moved to core-libs-dev and compiler-dev in March,
> here
> > it is:
> >
> > http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/
> Generated.html
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Stephen Colebourne
In reply to this post by Stephen Colebourne
And just noting that the thread in March did not call out the fact
that the webrev did not correspond to the original agreed change from
Mark/jigsaw-dev. The only way you'd have spotted the package was
javax.annotation.processing and not java.lang.annotation is by
clicking on the webrev itself. Sorry, but I'm not impressed by this.

Stephen


On 20 September 2017 at 13:58, Stephen Colebourne <[hidden email]> wrote:

> Ouch. Thats an unpleasant result. It should have gone in `java.lang.annotation`.
> Stephen
>
> On 20 September 2017 at 13:49, Alan Bateman <[hidden email]> wrote:
>> On 20/09/2017 13:43, Stephen Colebourne wrote:
>>>
>>> As per this email:
>>>
>>> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
>>> the idea was to add a new annotation `java.lang.annotation.Generated`
>>> to replace the old problematic one.
>>>
>>> Is it my imagination, or did this get forgotten?:
>>>
>>
>> The discussion/review moved to core-libs-dev and compiler-dev in March, here
>> it is:
>>
>> http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/Generated.html
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Alan Bateman
In reply to this post by Stephen Colebourne
On 20/09/2017 13:58, Stephen Colebourne wrote:
> Ouch. Thats an unpleasant result. It should have gone in `java.lang.annotation`.
> Stephen
>
That was the original suggestion but that package is more for
annotations types that are used as meta annotations (@Native should have
gone elsewhere but we can't change that now).

compiler-dev would be a better list to discuss this. As I recall,
javax.annotation.processing was chosen in preference to
java.lang.reflect or a new package for annotations.

-Alan.


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Stephen Colebourne
On 20 September 2017 at 14:22, Alan Bateman <[hidden email]> wrote:
> That was the original suggestion but that package is more for annotations
> types that are used as meta annotations (@Native should have gone elsewhere
> but we can't change that now).

A point acknowledged by
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-February/011365.html
and yet it still accepted it as the best location!

Basically, by not being in java.base it isn't useful to the people who
need it. No-one is going to pull in the java.compiler module just to
get this annotation. Jut like the original thread, I think the way
that this is used has been lost.

Stephen
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Michael Rasmussen
In reply to this post by Stephen Colebourne
This one?
http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/Generated.html

/Michael

On Sep 20, 2017 18:44, "Stephen Colebourne" <[hidden email]> wrote:

> As per this email:
>  http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-
> February/011365.html
> the idea was to add a new annotation `java.lang.annotation.Generated`
> to replace the old problematic one.
>
> Is it my imagination, or did this get forgotten?:
>  http://download.java.net/java/jdk9/docs/api/java/lang/
> annotation/package-summary.html
>
> Stephen
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.annotation.Generated

Sanne Grinovero-2
For people looking for an example solution, this is what we ended up doing
in Hibernate projects after we had shared these pain points in February:
add an explicit dependency to the Maven artifact
`javax.annotation:jsr250-api:1.0`.

We use an explicit phase for running annotation processors via the
maven-processor-plugin, so that it doesn't pollute published dependency
definitions.

https://github.com/hibernate/hibernate-search/blob/master/pom.xml#L996-L1001

HTH

Thanks,
Sanne


On Wed, Sep 20, 2017 at 4:50 PM, Michael Rasmussen <
[hidden email]> wrote:

> This one?
> http://download.java.net/java/jdk9/docs/api/javax/annotation/processing/
> Generated.html
>
> /Michael
>
> On Sep 20, 2017 18:44, "Stephen Colebourne" <[hidden email]> wrote:
>
> > As per this email:
> >  http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-
> > February/011365.html
> > the idea was to add a new annotation `java.lang.annotation.Generated`
> > to replace the old problematic one.
> >
> > Is it my imagination, or did this get forgotten?:
> >  http://download.java.net/java/jdk9/docs/api/java/lang/
> > annotation/package-summary.html
> >
> > Stephen
> >
>