aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr98901/Case16.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs150/pr98901/Case16.aj')
-rw-r--r--tests/bugs150/pr98901/Case16.aj29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/bugs150/pr98901/Case16.aj b/tests/bugs150/pr98901/Case16.aj
new file mode 100644
index 000000000..38f5965c6
--- /dev/null
+++ b/tests/bugs150/pr98901/Case16.aj
@@ -0,0 +1,29 @@
+// "public abstract annotated ITD method"
+
+import java.lang.annotation.*;
+import java.lang.reflect.Method;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface anInterface{}
+
+abstract class A16{
+}
+
+aspect B16 {
+
+ @anInterface
+ public abstract void A16.a();
+
+ public static void main(String [] args){
+ Class c = A16.class;
+ try {
+ Method m = c.getDeclaredMethod("a", new Class [0]);
+ Annotation [] anns = m.getDeclaredAnnotations();
+ for (int i = 0;i < anns.length;i++){
+ System.out.println(anns[i]);
+ }
+ } catch (Exception e){
+ System.out.println("exceptional!");
+ }
+ }
+}