diff options
author | aclement <aclement> | 2008-05-10 00:33:22 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-05-10 00:33:22 +0000 |
commit | b6464f5bb94272e01fd77fab1c3a508334eefa8a (patch) | |
tree | ab26ece51886aea1360a88b48c8baa9f9c8934d8 /tests/bugs161 | |
parent | 78e2c20178e245e7dac74b9646841beaa376d0d5 (diff) | |
download | aspectj-b6464f5bb94272e01fd77fab1c3a508334eefa8a.tar.gz aspectj-b6464f5bb94272e01fd77fab1c3a508334eefa8a.zip |
227993: annotation value matching support for field annotations. plus hashcode/equals on annotationtypepatterns where it was missing!
Diffstat (limited to 'tests/bugs161')
-rw-r--r-- | tests/bugs161/pr227993/FieldJP.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs161/pr227993/FieldJP.java b/tests/bugs161/pr227993/FieldJP.java new file mode 100644 index 000000000..e36de3531 --- /dev/null +++ b/tests/bugs161/pr227993/FieldJP.java @@ -0,0 +1,41 @@ + +import java.lang.annotation.*; + +enum Store {YES,NO;} + +@Retention(RetentionPolicy.RUNTIME) +@interface SearchableProperty { Store store(); } + +public class FieldJP { + @SearchableProperty(store=Store.YES) + public static int fieldOne; + + @SearchableProperty(store=Store.NO) + public static int fieldTwo; + + public static int fieldThree; + + public static void main(String[] args) { + System.err.println("fone="+fieldOne); + System.err.println("ftwo="+fieldTwo); + System.err.println("fthr="+fieldThree); + fieldOne = 5; + fieldTwo = 6; + fieldThree = 7; + } +} + +aspect X { + before(): get(@SearchableProperty(store=Store.YES) * *) { + System.err.println("get of YES field"); + } + before(): get(@SearchableProperty(store=Store.NO) * *) { + System.err.println("get of NO field"); + } + before(): set(@SearchableProperty(store=Store.YES) * *) { + System.err.println("set of YES field"); + } + before(): set(@SearchableProperty(store=Store.NO) * *) { + System.err.println("set of NO field"); + } +}
\ No newline at end of file |