зеркало из
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 05:57:44 +02:00
21 строка
512 B
Java
21 строка
512 B
Java
abstract aspect StaticAdviceOnAbstract {
|
|
abstract pointcut i();
|
|
|
|
pointcut j():
|
|
i()
|
|
&& !this(StaticAdviceOnAbstract)
|
|
&& call(new(..)) ;
|
|
}
|
|
|
|
aspect Concrete {
|
|
// static advice indirectly on an abstract pointcut
|
|
after() returning(Object o): StaticAdviceOnAbstract.j() {
|
|
System.out.println("we have"+o);
|
|
}
|
|
|
|
// a simple case of directly on abstract pointcut
|
|
after() returning(Object o): StaticAdviceOnAbstract.i() {
|
|
System.out.println("we have"+o);
|
|
}
|
|
}
|