--- /dev/null
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+public class A {
+ public static void main(String []argv) throws Exception {
+ Method m = A.class.getDeclaredMethod("foo");
+ printM(m);
+ }
+
+ private static void printM(Method m) {
+ System.out.println(m.getName());
+ Annotation[] as = m.getAnnotations();
+ for (Annotation a: as) {
+ System.out.println(a);
+ }
+ }
+}
+
+aspect X {
+ public void A.foo() {}
+}
--- /dev/null
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+public class B {
+ public static void main(String []argv) {
+ Field[] fs = B.class.getDeclaredFields();
+ for (Field f: fs) {
+ printM(f);
+ }
+ }
+
+ private static void printM(Field m) {
+ System.out.println(m.getName());
+ Annotation[] as = m.getAnnotations();
+ for (Annotation a: as) {
+ System.out.println(a);
+ }
+ }
+}
+
+aspect X {
+ public int B.boo;
+}
</ajc-test>
<ajc-test dir="java5/reflection" title="reflection on itds">
- <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore"></compile>
+ <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore -makeAjReflectable"></compile>
<run class="ReflectOnCodeStyleITDs" classpath="../lib/bcel/bcel.jar">
<stdout>
<line text="public C.new(int, int, int)"/>
<ajc-test dir="java5/reflection" pr="114322" title="reflection on abstract ITDs (Billing example)">
- <compile files="ReflectBilling.java,Billing.aj" options="-1.5"/>
+ <compile files="ReflectBilling.java,Billing.aj" options="-1.5 -makeAjReflectable"/>
<run class="ReflectBilling">
<stdout>
<line text="public void Customer.addCharge(long)"/>
</ajc-test>
<ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for itds">
- <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore">
+ <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore -makeAjReflectable">
</compile>
<run class="a.b.c.ITDTest" ltw=""/>
</ajc-test>
// runTest("advising privileged access method");
// }
+ public void testItdMarkerAnnotations_309743() {
+ runTest("itd marker annotations - 1");
+ }
+
+ public void testItdMarkerAnnotations_309743_2() {
+ runTest("itd marker annotations - 2");
+ }
+
public void testPipeliningAndGenerics_309336() {
runTest("pipelining and generics");
}
<suite>
+ <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 1">
+ <compile files="A.java" options="-1.5"/>
+ <run class="A">
+ <stdout>
+ <line text="foo"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 2">
+ <compile files="B.java" options="-1.5"/>
+ <run class="B">
+ <stdout>
+ <line text="boo"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr309336" title="pipelining and generics">
<compile files="NoSystemStreams.aj UseOperators.java Operators.java" options="-1.5">
<message kind="warning" text="No system.out"/>
</ajc-test>
<ajc-test dir="features169/transparent" title="declare at on private itd">
- <compile files="OneDeclareAt.java" options="-1.5"/>
+ <compile files="OneDeclareAt.java" options="-1.5 -makeAjReflectable"/>
</ajc-test>
<ajc-test dir="features169/transparent" title="declare at two">
- <compile files="DeclareAtTwo.java" options="-1.5"/>
+ <compile files="DeclareAtTwo.java" options="-1.5 -makeAjReflectable"/>
</ajc-test>
<ajc-test dir="features169/transparent" title="three">