私の AspectJ プロジェクトには、次のようなコードがあります。
public aspect MyAspect {
public Object MyInterface.getMyself() {
return this;
}
}
public interface MyInterface {
}
public class MyClassOne implements MyInterface {}
public class MyClassTwo implements MyInterface {}
では、AspectJ はどのようにして型間宣言内にコードを挿入するのでしょうか? MyInterface.getMyself()また、 asを宣言する代わりに、Objectasthis.getClass()またはそのようなものを宣言する方法はMyClassOneありMyClassTwoますか?