org.aspectj/tests/base/test111/SuperAspect.java

13 lines
454 B
Java
Raw Normal View History

2002-12-16 19:51:06 +01:00
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 );
}
}