users@jsr311.java.net

Re: Annotations on interfaces and super classes <was> Re: URI Contracts

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 11 Jun 2008 11:30:14 -0400

On Jun 11, 2008, at 11:23 AM, Bill Burke wrote:
>>
>> So the key thing here is to be able to have annotations on
>> interfaces so you can "export" the JAX-RS information via an
>> interface rather than having it tied to an implementation class
>> (which in this case is an EJB). Your code only inspects the
>> interface since the implementation class is hidden from you by the
>> EJB plumbing.
>> Interestingly, this isn't the functionality addressed by the
>> annotation inheritance defined by the spec (section 3.6). That is
>> targeted at making annotations on an abstract method available to a
>> runtime inspecting an implementation class. We could remove the
>> inheritance of annotations on abstract methods without impacting
>> your use case at all.
>
> I had a user that wanted the current annotation inheritance defined
> in the specification. Let me see if I can find the email/usecase.
>
OK.

> Also, I hope you don't mean remove annotations on superclasses/
> methods?
>
No, I wasn't suggesting that. Implementations would still be required
to look at all the methods of the class including those of super
classes.

Marc.

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