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.

BindingInts3.java 440B

1234567891011121314151617181920212223242526
  1. import java.lang.annotation.*;
  2. @Retention(RetentionPolicy.RUNTIME)
  3. @interface Foo {
  4. String i() default "abc";
  5. }
  6. public class BindingInts3 {
  7. public static void main(String []argv) {
  8. BindingInts3 inst = new BindingInts3();
  9. inst.a();
  10. inst.b();
  11. }
  12. @Foo
  13. void a() {}
  14. void b() {}
  15. }
  16. aspect X {
  17. before(String i): execution(* a(..)) && @annotation(Foo(i)) {
  18. System.out.println(thisJoinPointStaticPart+" "+i);
  19. }
  20. }