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.

Doo.java 383B

123456789101112131415161718192021222324252627
  1. import java.lang.annotation.*;
  2. @Retention(RetentionPolicy.RUNTIME)
  3. @interface Goo {}
  4. @Goo
  5. public class Doo {
  6. public static void main(String []argv) {
  7. new Doo().m(); // advises here
  8. }
  9. public void m() {
  10. System.err.println("");
  11. }
  12. }
  13. class Soo {
  14. public void m() {
  15. System.err.println("");
  16. }
  17. }
  18. aspect X {
  19. before(): call(* println(..)) && !@within(Goo) {
  20. }
  21. }