1234567891011121314151617181920212223242526 |
- import java.lang.annotation.*;
-
- @Retention(RetentionPolicy.RUNTIME)
- @interface Anno {
- String string();
- }
-
- @Retention(RetentionPolicy.RUNTIME)
- @interface Anno2 {
- String string() default "abc";
- }
-
-
- public class Code {
-
- @Anno(string="hello")
- int field;
-
- public static void main(String []argv) {
- }
-
- }
-
- aspect X {
- declare @field: @Anno(string=$1) * *: @Anno2(string=$1);
- }
|