blob: df97973b80b678e2d739bef2c41acce81fbc1496 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import org.aspectj.testing.Tester;
public aspect SuperAspect {
before(SuperClass s): target(s) && call(* getX(..)) {
Tester.checkEqual(thisJoinPoint.getSignature().getName(), "getX", "method name");
//!!! It's unclear what they value of this really should be
//Tester.checkEqual(thisJoinPoint.className, "SubClass", "class name");
// make a change to prove this is run
//x = x+42;
s.setX( s.checkX()+42 );
}
}
|