選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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. }