> On Jun 30, 2008, at 4:27 PM, Bill Burke wrote:
>>>>
>>> @GET @Path("foo")
>>> public SomeType getSomething() {...}
>>> If we pass annotations on the method (getSomething) rather that the type (SomeType), the MessageBodyWriter will get an array
>>> [GET, Path]. Its not a huge deal, just there's no way to annotate the return type separately from the method so the JX-RS
>>> annotations on the method will be included.
>>
>> Not a big deal, IMO. You might actually have different annotations on the same method that are consumed by different
>> MessageBodyWRiters depending on the response content-type.
>>
> OK, I'll clarify the javadoc along these lines. In the future if it becomes possible to annotate the return type separate from
> the method then we can add both sets of annotations together to retain backwards compatibility. This should work provided a
> particular annotation doesn't have a different meaning when applied to a return type or method.
+1. Collapsing all the parameters into a single aggregate one, as I suggested earlier would be a bit radical at this stage and would
require the introduction of another API entity...In a rare (future) case when a particular annotation has a different meaning when
applied to a return type or method I suppose it would be up to that annotation instance to provide a hint to the consumer's code.
Cheers, Sergey
>
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland