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.

PerObject.java 358B

12345678910111213141516171819202122
  1. public class PerObject {
  2. public static void main(String[] args) {
  3. new PerObject().m();
  4. }
  5. void m() {
  6. System.out.println("m()");
  7. }
  8. }
  9. aspect A perthis(pc()) {
  10. pointcut pc(): this(PerObject) && execution(* m(..));
  11. static Object o = new Integer(2);
  12. before(): get(* *) {
  13. System.out.println("in " + o.toString());
  14. }
  15. static {
  16. o = "hello";
  17. }
  18. }