您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021
  1. public class Four {
  2. public static void main(String[] argv) {
  3. Four a = new Four();
  4. a.m();
  5. }
  6. public void m() {
  7. System.out.println("Method m() running");
  8. }
  9. }
  10. aspect X {
  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() "+thisJoinPointStaticPart);
  17. }
  18. }