--- /dev/null
+@Configurable
+public class Annotated {
+
+}
\ No newline at end of file
--- /dev/null
+public aspect AnnotationMatcher {
+
+ after() returning : initialization(*.new(..)) && @this(Configurable) {
+ System.out.println("annotated type initialized");
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Configurable {
+
+}
\ No newline at end of file
--- /dev/null
+public class Main {
+
+ public static void main(String[] args) {
+ new Annotated();
+ }
+
+}
\ No newline at end of file
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
-
+ public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
+
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
<compile files="EMA.java" options="-1.5"/>
</ajc-test>
+ <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
+ <compile
+ files="Configurable.java, AnnotationMatcher.aj"
+ options="-1.5"
+ outjar="aspectlib.jar"
+ outxmlfile="META-INF/aop.xml"/>
+ <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
+ <run class="Main" ltw="">
+ <stdout>
+ <line text="annotated type initialized"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
</suite>
\ No newline at end of file