dev@jsr311.java.net

RE: Inheritance of Java classes

From: Jerome Louvel <jerome.louvel_at_noelios.com>
Date: Sat, 19 May 2007 21:32:40 +0200

Dhanji,

If an annotated method is overridden, without a new annotation, I would
consider that the new method hides the one in the super class, as well as
the annotation. I'm not 100% sure though.

Best regards,
Jerome

> -----Message d'origine-----
> De : Dhanji R. Prasanna [mailto:dhanji_at_gmail.com]
> Envoyé : samedi 19 mai 2007 20:46
> À : dev_at_jsr311.dev.java.net
> Objet : Re: Inheritance of Java classes
>
>
>
> On 5/19/07, Jerome Louvel <jerome.louvel_at_noelios.com> wrote:
>
>
> Hi Dhanji,
>
> > For the identification, the annotation @ResourceRef
> > could be inherited
> > indeed, but if it is overridden in a subclass, the
> > subclass's annotation
> > should have priority.
> >
> > What if it is overridden without any annotation--is that
> > considered a hiding override or an error?
>
> The @ResourceRef annotation is set on the class itself,
> so a subclass
> without annotation, should inherit the parent annotation.
>
>
> How about the @Output method? And the various other
> annotations on methods? Just curious how you see it playing.
>
> Will go thru the sketch in some more detail real soon.
>
> Dhanji.
>