diff options
Diffstat (limited to 'tests/bugs1612/pr327141/AspectWithConstant.aj')
-rw-r--r-- | tests/bugs1612/pr327141/AspectWithConstant.aj | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs1612/pr327141/AspectWithConstant.aj b/tests/bugs1612/pr327141/AspectWithConstant.aj new file mode 100644 index 000000000..1dea5b8f4 --- /dev/null +++ b/tests/bugs1612/pr327141/AspectWithConstant.aj @@ -0,0 +1,17 @@ +import java.lang.annotation.*; + +public aspect AspectWithConstant { + declare @field : * AspectWithConstant.MAX* : @Loggable; + public static final int MAX = 9; + public static final float MAXf = 9.0f; + public static final double MAXd = 9.0d; + public static final long MAXl = 9L; + public static final Class MAXc = String.class; + @Retention(RetentionPolicy.RUNTIME) + @interface Loggable { } + + public static void main(String []argv) throws Exception { + System.out.println("MAX="+MAX); +System.out.println(AspectWithConstant.class.getDeclaredField("MAX").getAnnotation(Loggable.class)); + } +} |