users@jsr311.java.net

Re: MessageBodyWriter and annotations

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

On Jun 30, 2008, at 11:21 AM, Sergey Beryozkin wrote:
>
> 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 ?
>
Yes, AnnotationB.

Marc.

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