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.

Good.java 957B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import java.util.*;
  2. import java.io.IOException;
  3. public class Good {
  4. public static String foo;
  5. public int publicA = 1;
  6. private int privateA = 2;
  7. protected int protectedA = 3;
  8. int packageA = 4;
  9. { publicA = 5; }
  10. static { foo = "hi"; }
  11. public Good() { }
  12. public void foo() {
  13. int i = 0;
  14. i += 1;
  15. i += 2;
  16. }
  17. { publicA = 6; }
  18. }
  19. aspect A {
  20. int pkg1.Bar.interTypeField = 0;
  21. //void Good.interTypeMethod() { }
  22. int j;
  23. before(): execution(void Good.foo()) {
  24. System.out.println("");
  25. }
  26. public void m() { }
  27. pointcut all(): call(* *(..));
  28. after(): all() { System.out.println(""); }
  29. declare warning: call(* mumble*(..)): "warning";
  30. declare error: call(* gumble*(..)): "error";
  31. // declare parents: Point extends java.io.Serializable;
  32. // declare parents: Point implements java.util.Observable;
  33. // declare soft: Point: call(* *(..));
  34. }
  35. interface I { }
  36. //privileged aspect PrivilegedAspect { }