You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SuperAspect.java 454B

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