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

ClassExtendingAspect.java 380B

12345678910111213141516171819202122
  1. import org.aspectj.testing.*;
  2. public class ClassExtendingAspect {
  3. public static void main(String[] args) {
  4. new ClassExtendingAspect().go(args);
  5. }
  6. void go(String[] args) {
  7. Extends e = new Extends();
  8. Tester.check(false, "shouldn't have compiled!");
  9. }
  10. }
  11. aspect Aspect {
  12. }
  13. class Extends extends Aspect {
  14. pointcut p(): call(* *());
  15. }