1
// Bind the this on a call and change it with proceed... makes no difference
2
import org.aspectj.lang.ProceedingJoinPoint;
3
import org.aspectj.lang.annotation.*;
9
@Around("call(void M.method(String)) && args(p) && this(t)")
10
public void a( ProceedingJoinPoint pjp, N t,String p) throws Throwable {
11
System.err.println("advice from ataj aspect");
12
pjp.proceed(new Object[]{newN,"faked"});
15
public static void main(String []argv) {
21
public static void main( String[] args ) {
23
n.methodCaller("real");
27
public void methodCaller(String param) {
37
public M(String prefix) { this.prefix = prefix; }
38
public void method(String s) { System.err.println(prefix+s); }
46
public M(String prefix) { this.prefix = prefix; }
48
public static void main( String[] args ) {
50
m.methodCaller("real");
53
public void methodCaller(String param) {
57
public void method(String s) { System.err.println(prefix+s); }