Defender methods and reabstraction
Rémi Forax
forax at univ-mlv.fr
Thu Dec 2 05:18:46 PST 2010
Le 02/12/2010 14:12, Collin Fagan a écrit :
> />
> > // maybe
> > interface B extends A {
> > @Override
> > void m() default super.m; // or A.super.m
> > }
>
> You need that if you override the method to add doc comment./
>
> You would also need to do this if you wanted to change or remove the
> annotations that apply to a method.
> /
> /interface A {
> /@XMElement/
> void m() default Stuff.foo;
> }
>
> interface B extends A {
> @XMLTransient
> @Override
> void m() default super.m; // or A.super.m
> }
>
> or
> interface B extends A {
> @Override
> void m() default super.m; // or A.super.m
> }
>
> Collin
Hi Collin,
by default you don't inherits from annotation of an overriden method.
Annotation inheritance only happens between types.
Rémi
More information about the lambda-dev
mailing list