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