users@jsr311.java.net

Re: Annotation inheritance

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Wed, 30 Apr 2008 12:47:20 +0200

Hi Sergey,

the specification says, that only the annotations of methods are
inherited, so @Path is not inherited. AFAIK (but I'm not sure) this is
the same on other annotation inheritance definitions (JSR 250 ?)

best regards
   Stephan

Sergey Beryozkin schrieb:
> Hi,
>
> Does JAX-RS allow for annotations rooted at the interface (as opposed
> to interface methods) be inherited ?
> What about those targeting interface/subclass method parameters ?
>
> For ex :
> @Path("/{id}"
> interface ServiceInterface {
> void getIt(@PathParam("id") String id);
> }
>
> class ServiceInterfaceImpl implements ServiceInterface {}
>
> Can @Path and @PathParam inherited ?
>
> Thanks, Sergey