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.

Code.java 382B

1234567891011121314151617181920212223242526
  1. import java.lang.annotation.*;
  2. @Retention(RetentionPolicy.RUNTIME)
  3. @interface Anno {
  4. String string();
  5. }
  6. @Retention(RetentionPolicy.RUNTIME)
  7. @interface Anno2 {
  8. String string() default "abc";
  9. }
  10. public class Code {
  11. @Anno(string="hello")
  12. int field;
  13. public static void main(String []argv) {
  14. }
  15. }
  16. aspect X {
  17. declare @field: @Anno(string=$1) * *: @Anno2(string=$1);
  18. }