What I wanted to know was if declaring an implementation for an interface,
automatically declared the implementation for the implementing classes. But
the answer is no.
I've filed an enhancement request (as suggested by other users):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288713
Thanks.

On Thu, Sep 3, 2009 at 5:40 PM, Andy Clement <[email protected]>wrote:

> Does this do what you want?
>
>
> interface A { }
>
> interface B { void foo();}
>
> class BImpl implements B { public void foo() {System.out.println("foo
> running");}}
>
> @Aspect
> class X {
>
>        @DeclareMixin("C")
>        public static B createB() {
>                return new BImpl();
>        }
>
>        public static void main(String[] args) {
>                ((B)new C()).foo();
>        }
> }
>
> class C implements A { }
>
>
> 2009/9/1 João Gonçalves <[email protected]>:
> > Greetings.
> >
> > Can I use @DeclareParents this way:
> >
> >
> > interface A { }
> >
> > interface B { }
> >
> > @DeclareParents(value="B", defaultImpl=BImpl.class)
> > private A something;
> >
> > class C implements A { }
> >
> >
> >
> >
> > Will class C have the methods declared in B?
> >
> > _______________________________________________
> > aspectj-users mailing list
> > [email protected]
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> >
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to