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.

Eleven.java 428B

12345678910111213141516171819202122
  1. public class Eleven {
  2. public static void main(String[] argv) {
  3. Eleven a = new Eleven();
  4. a.m();
  5. }
  6. public void m() {
  7. System.out.println("Method m() running");
  8. }
  9. }
  10. aspect X perthis(this(Eleven)) {
  11. boolean doit() {
  12. System.out.println("In instance check method doit()");
  13. return true;
  14. }
  15. before():execution(* m(..)) && if(thisAspectInstance.doit()){
  16. System.out.println("In advice()");
  17. }
  18. }