mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 17:58:43 +02:00
21 lines
512 B
Java
21 lines
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);
|
||
|
}
|
||
|
}
|