次の例のクラスがmy.package
...
public class Foo {
public void logicNotInBar() {/*code*/}
public void logicBarOverrides() {/*code*/}
}
public class Bar extends Foo {
public void logicBarOverrides() {/*code*/}
}
そして、次のSpring-AOPポイントカット...
<aop:pointcut id="myPointcutAll" expression="execution(* my.package.*.*(..))" />
<aop:pointcut id="myPointcutFoo" expression="execution(* my.package.Foo.*(..))" />
<aop:pointcut id="myPointcutBar" expression="execution(* my.package.Bar.*(..))" />
Bar のインスタンスで上記のポイントカットに適用されたアドバイスの結果は何ですか? 特に...
Bar bar = new Bar();
bar.logicNotInBar(); // will myPointcutBar advice trigger?
bar.logicBarOverrides(); // is myPointcutFoo ignored here?
ポイントカットが継承とどのように相互作用するかについての基本的な真実が欠けていると思うので、内部の説明/ドキュメントはおそらく大いに役立つでしょう。