users@jersey.java.net

Re: [Jersey] hierarchy of resources ?

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Fri, 1 May 2009 08:58:49 -0700

2009/5/1 Felipe Gaścho <fgaucho_at_gmail.com>:
> humm.. from the link:
>
> "If a subclass or implementation method has any JAX-RS annotations
> then all of the annotations on the super class or interface method are
> ignored"
>
> so, I cannot share resources using annotations & generics.. my former goal......

I guess statement is slightly vague: my reading would be that handling
differs between class and method annotations:

(a) If method has an annotation, none of overridden method's
annotations are used
(b) If class has an annotation, none of super-class/interface's class
annotations is used.

but that (b) does not affect (a).

But the other reading would combine the two, meaning that annotations
from just a single class take effect.

-+ Tatu +-