blob: 26f213b0c940312ef17a085b2d91d7f1a0c63c2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package main.p1;
import main.p2.AbstractTest;
import main.Driver;
final aspect ConcreteTest extends AbstractTest {
protected pointcut pc(): execution(* Driver.doStuff());
protected pointcut pc2(): execution(* Driver.doOtherStuff());
Object around(): pc2() {
//System.out.println("adding to the other stuff");
/*If we comment out the next line we don't get a verify error.*/
ConcreteTest ct = this;
System.out.println("test: " + s + ", " + this.s + ", " + ct.s);
System.out.println("The value of the field when replacing is " + getField());
return proceed();
}
protected void hook() {
/*This doesn't cause a verify error because this code is not inlined*/
System.out.println("The value of the field is " + getField());
}
}
|