Re: JSR311: _at_Target of FIELD for _at_*Param annotations

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 07 Mar 2008 13:00:53 -0500

It would bother me if we added new targets but didn't define what
should happen if a developer uses those targets. E.g. if we added
FIELD as a target for @PathParam then I think we'd have to require
implementations to support that annotation on resource class fields.
That's fine for the per-request resource life cycle but what about
singleton resources...

I think I might have suggested this before but maybe we should think
about a meta-annotation to form the basis of the @*Param annotations
then you could innovate by creating new annotation that use the core
meta-annotation. E.g.

public @interface HeaderParam {
     String value();

The spec would specify the relationship between @Source and the target
annotation value. It would also specify where to look for @Source-
annotated annotations but wouldn't restrict where else they could be
used. Then you could add:

public @interface BillsInnovativeHeaderParam {
     String value();


On Mar 7, 2008, at 11:54 AM, Stephan Koops wrote:

> Yes, I also think so !
> Stephan
> Bill Burke schrieb:
>> Expressed here:
>> id=34
>> Can you please allow a FIELD @Target for all @*Param and injection
>> annotations? I have a bunch of ideas that I'm trying out and can't
>> "innovate" without this setting.
>> Thanks
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.