diff options
author | aclement <aclement> | 2010-11-24 18:35:20 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-11-24 18:35:20 +0000 |
commit | 8a0954f7a241ece8c339709b97cec2cb889e108a (patch) | |
tree | 747535454bc77f796437317ec76127bbbfce766f /tests/features1611/declareMinus/Code.java | |
parent | 0414d23e74ec44d7aebdc4033e80bab4abcb8c32 (diff) | |
download | aspectj-8a0954f7a241ece8c339709b97cec2cb889e108a.tar.gz aspectj-8a0954f7a241ece8c339709b97cec2cb889e108a.zip |
329925: declare @field remove annotation
Diffstat (limited to 'tests/features1611/declareMinus/Code.java')
-rw-r--r-- | tests/features1611/declareMinus/Code.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/features1611/declareMinus/Code.java b/tests/features1611/declareMinus/Code.java new file mode 100644 index 000000000..133c60249 --- /dev/null +++ b/tests/features1611/declareMinus/Code.java @@ -0,0 +1,20 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Anno {} + +aspect Foo { + declare @field: * Code.someField: -@Anno; +} + +public class Code { + + @Anno + public static int someField; + + public static void main(String[]argv) throws Exception { + Object o = Code.class.getDeclaredField("someField").getAnnotation(Anno.class); + System.out.println(o==null?"no annotation":"has annotation"); + } +} + |