users@jsr311.java.net

Re: MessageBodyWriter and annotations

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 30 Jun 2008 11:28:33 -0400

On Jun 30, 2008, at 11:25 AM, Stephan Koops wrote:
>
> I think ever the ones of the resource method -> @AnnotationA.
> Perhaps it is not clear enough.
>
Not clear enough :-(. Annotations from the type returned, not the
method returning the type.

> Marc, the javadoc refers to the creation from a field? I think the
> only way to return objects are the resource methods.
>
I'll fix that.

Marc.

> Sergey Beryozkin schrieb:
>> Hi
>>
>> Consider this method :
>>
>> @AnnotationA
>> public Response get() {
>> return Response.ok().entity(new Foo()).build();
>> }
>>
>> @AnnotationB
>> public class Foo {}
>>
>> Which annotation should be passed to a given MessageBodyWriter
>> instance capable of serializing Foo ?
>> Is it @AnnotationB ?
>>
>> Thanks, Sergey
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

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