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.

EmptyInterfaceCE.java 706B

1234567891011121314151617181920212223242526272829303132
  1. import org.aspectj.testing.Tester;
  2. /** @testcase PR#36778 advise join points in subclass of empty interface */
  3. public class EmptyInterfaceCE {
  4. public static void main(String[] args) {
  5. new C().go();
  6. // at least constructor and method execution
  7. if (2 > Log.hits) {
  8. Tester.check(false, Log.log.toString());
  9. }
  10. }
  11. }
  12. aspect Log {
  13. static int hits;
  14. static StringBuffer log = new StringBuffer();
  15. interface LoggedType {
  16. }
  17. declare parents: C implements LoggedType;
  18. void around() : staticinitialization(LoggedType) // CE: limitation
  19. {
  20. hits++;
  21. log.append(thisJoinPoint + ";");
  22. }
  23. }
  24. class C {
  25. void go() {}
  26. }