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.

AspectWithConstant.aj 444B

12345678910111213
  1. import java.lang.annotation.*;
  2. public aspect AspectWithConstant {
  3. declare @field : * AspectWithConstant.MAX* : @Loggable;
  4. public static final String MAXS = "hello";
  5. @Retention(RetentionPolicy.RUNTIME)
  6. @interface Loggable { }
  7. public static void main(String []argv) throws Exception {
  8. System.out.println("MAXS="+MAXS);
  9. System.out.println(AspectWithConstant.class.getDeclaredField("MAXS").getAnnotation(Loggable.class));
  10. }
  11. }