Hi !

IIs it possible to extract the static definitions in MyClass1 and MyClass2 into an aspect ? I know how I can weave in the implementation of an interface, but in this case I would need to weave in the return type to. Is this even possible ?

abstract class SuperClass (

protected static <T> T byId(final Class<T> classType, final BigDecimal id) {
                        ..... do something and return new object of type T
        }
}


class MyClass1 extends SuperClass {

        static MyClass1 byId(BigDecimal id) {
                SuperClass.byId(MyClass1.class, id);
        }

}

class MyClass2 extends SuperClass {

        static MyClass2 byId(BigDecimal id) {
                SuperClass.byId(MyClass2.class, id);
        }


}

Regards
  Roger





_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to