mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-03 05:54:57 +02:00
22 lines
367 B
Plaintext
22 lines
367 B
Plaintext
import java.util.*;
|
|
|
|
public privileged aspect TestAspect {
|
|
|
|
pointcut p(Test t):
|
|
target(t) &&
|
|
get(!public Set<Number+> *Set) &&
|
|
!within(TestAspect);
|
|
|
|
Set around(Test t):p(t) {
|
|
Set s = proceed(t);
|
|
return s;
|
|
}
|
|
|
|
public static void main(String []argv) {
|
|
|
|
Set<Integer> si = new Test1().foo();
|
|
Set<Double> sd = new Test2().foo();
|
|
}
|
|
|
|
}
|