--- /dev/null
+aspect A3 {
+ before():staticinitialization(*) {}
+}
--- /dev/null
+<aspectj>
+ <aspects>
+ <aspect name="A" scope="B"/>
+ </aspects>
+ <weaver>
+ <!-- Do not apply on any aspects -->
+ <exclude within="A*"/>
+ </weaver>
+</aspectj>
--- /dev/null
+<aspectj>
+ <aspects>
+ <aspect name="A2" scope="B2"/>
+ </aspects>
+</aspectj>
--- /dev/null
+<aspectj>
+ <aspects>
+ <aspect name="A3"/>
+ </aspects>
+</aspectj>
runTest("aop config - 5");
}
+ /**
+ * If multiple XML files are given together with {@code -xmlConfigured}, they will be logically merged into one.
+ * I.e., given the following three XML config files:
+ *
+ * <pre>{@code
+ * <aspectj>
+ * <aspects>
+ * <aspect name="A" scope="B"/>
+ * </aspects>
+ * <weaver>
+ * <exclude within="A*"/>
+ * </weaver>
+ * </aspectj>
+ * }</pre>
+ *
+ * <pre>{@code
+ * <aspectj>
+ * <aspects>
+ * <aspect name="A2" scope="B2"/>
+ * </aspects>
+ * </aspectj>
+ * }</pre>
+ *
+ * <pre>{@code
+ * <aspectj>
+ * <aspects>
+ * <aspect name="A3"/>
+ * </aspects>
+ * </aspectj>
+ * }</pre>
+ *
+ * The result will be as if only one XML config file with this content was specified:
+ *
+ * <pre>{@code
+ * <aspectj>
+ * <aspects>
+ * <aspect name="A" scope="B"/>
+ * <aspect name="A2" scope="B2"/>
+ * <aspect name="A3"/>
+ * </aspects>
+ * <weaver>
+ * <exclude within="A*"/>
+ * </weaver>
+ * </aspectj>
+ * }</pre>
+ */
+ public void testMultipleXMLFiles() {
+ runTest("aop config - multiple XML files");
+ }
+
public void testAjcThisNotRead() {
runTest("ajcthis not read");
}
</compile>
</ajc-test>
+ <ajc-test dir="features164/aopconfig/one" title="aop config - multiple XML files">
+ <!-- Java, AspectJ and XML files can be specified in any order. See how they are mixed here. -->
+ <compile files="A.java A2.java A3.java multi1.xml multi2.xml B.java B2.java multi3.xml" options="-1.5 -showWeaveInfo -xmlConfigured">
+ <message kind="weave" text="Join point 'staticinitialization(void B.<clinit>())' in Type 'B' (B.java:1) advised by before advice from 'A3' (A3.java:2)"/>
+ <message kind="weave" text="Join point 'staticinitialization(void B.<clinit>())' in Type 'B' (B.java:1) advised by before advice from 'A' (A.java:2)"/>
+ <message kind="weave" text="Join point 'staticinitialization(void B2.<clinit>())' in Type 'B2' (B2.java:1) advised by before advice from 'A3' (A3.java:2)"/>
+ <message kind="weave" text="Join point 'staticinitialization(void B2.<clinit>())' in Type 'B2' (B2.java:1) advised by before advice from 'A2' (A2.java:2)"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs164/pr263310" title="inner handles">
<compile files="HandleTestingAspect.java" options="-1.5 -emacssym -Xlint:ignore"/>
</ajc-test>