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.

Pr73050.aj 507B

1234567891011121314151617181920
  1. public aspect Pr73050 {
  2. pointcut anonymousTypeMatchedByNamePattern() :
  3. staticinitialization(Pr73050.*1*);
  4. pointcut anonymousTypeMatchedByWildCard() :
  5. staticinitialization(Pr73050.*);
  6. declare warning : anonymousTypeMatchedByNamePattern() :
  7. "anonymous types shouldn't be matched by name patterns";
  8. declare warning : anonymousTypeMatchedByWildCard() :
  9. "anonymous types should be matched by a * wild card";
  10. public void foo() {
  11. (new Runnable() {
  12. public void run() {}
  13. }).run();
  14. }
  15. }