--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ int i() default 37;
+}
+
+
+public class BindingInts {
+ public static void main(String []argv) {
+ BindingInts inst = new BindingInts();
+ inst.a();
+ inst.b();
+ }
+@Foo
+void a() {}
+void b() {}
+}
+
+aspect X {
+ before(int i): execution(* a(..)) && @annotation(Foo(i)) {
+ System.out.println(thisJoinPointStaticPart+" "+i);
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ int i() default 37;
+}
+
+
+public class BindingInts2 {
+ public static void main(String []argv) {
+ BindingInts2 inst = new BindingInts2();
+ inst.a();
+ inst.b();
+ }
+
+ @Foo(i=99)
+ void a() {}
+
+ void b() {}
+}
+
+aspect X {
+ before(int i): execution(* a(..)) && @annotation(Foo(i)) {
+ System.out.println(thisJoinPointStaticPart+" "+i);
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ String i() default "abc";
+}
+
+
+public class BindingInts3 {
+ public static void main(String []argv) {
+ BindingInts3 inst = new BindingInts3();
+ inst.a();
+ inst.b();
+ }
+
+ @Foo
+ void a() {}
+
+ void b() {}
+}
+
+aspect X {
+ before(String i): execution(* a(..)) && @annotation(Foo(i)) {
+ System.out.println(thisJoinPointStaticPart+" "+i);
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ int i() default 37;
+ int j() default 48;
+}
+
+
+public class BindingInts4 {
+ public static void main(String []argv) {
+ BindingInts4 inst = new BindingInts4();
+ inst.a();
+ inst.b();
+ }
+@Foo
+void a() {}
+void b() {}
+}
+
+aspect X {
+ before(int i,int j): execution(* a(..)) && @annotation(Foo(i)) && @annotation(Foo(j)) {
+ System.out.println(thisJoinPointStaticPart+" "+i+" "+j);
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ String s() default "abc";
+ int i() default 37;
+}
+
+
+public class BindingInts5 {
+ public static void main(String []argv) {
+ BindingInts5 inst = new BindingInts5();
+ inst.a();
+ inst.b();
+ }
+@Foo
+void a() {}
+void b() {}
+}
+
+aspect X {
+ before(int i): execution(* a(..)) && @annotation(Foo(i)) {
+ System.out.println(thisJoinPointStaticPart+" "+i);
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+enum Color { R,G,B; }
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ String s() default "abc";
+ int i() default 37;
+ Color c() default Color.G;
+ int j() default 21;
+ int k() default 101;
+ float f() default 1.0f;
+}
+
+
+public class BindingInts6 {
+ public static void main(String []argv) {
+ BindingInts6 inst = new BindingInts6();
+ inst.a();
+ inst.b();
+ }
+@Foo(j=1,k=99)
+void a() {}
+void b() {}
+}
+
+aspect X {
+ before(int i,int j, int k): execution(* a(..)) && @annotation(Foo(i)) && @annotation(Foo(j)) && @annotation(Foo(k)) {
+ System.out.println(thisJoinPointStaticPart+" "+i+" "+j+" "+k);
+ }
+}