users@jsr311.java.net

Re: Annotation inheritance

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 30 Apr 2008 09:04:32 -0400

I hope that's not it! My understand was that an interface can be used,
but if u use an annotation in the class or any superclass then it is
inherited.

Stephan Koops wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com