Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Driver.java 436B

123456789101112131415161718192021
  1. import org.aspectj.testing.Tester;
  2. // PR#162
  3. // works with JDK > 1.2 but not with JDK < 1.1.8
  4. public aspect Driver {
  5. public static void main(String[] args) { test(); }
  6. public static void test() {
  7. Tester.checkEqual(new C().fi, 1, "");
  8. }
  9. pointcut install(): execution(new()) && within(C);
  10. /*static*/ after () : install() { }
  11. }
  12. class C {
  13. public final int fi;
  14. C() {
  15. fi = 1;
  16. }
  17. }