]> source.dussan.org Git - aspectj.git/commitdiff
163005: testcode
authoraclement <aclement>
Fri, 22 Aug 2008 23:36:20 +0000 (23:36 +0000)
committeraclement <aclement>
Fri, 22 Aug 2008 23:36:20 +0000 (23:36 +0000)
tests/bugs162/pr163005/ProblemAspect.java [new file with mode: 0644]
tests/bugs162/pr163005/SomeClass.java [new file with mode: 0644]
tests/bugs162/pr163005/SomeInterface.java [new file with mode: 0644]

diff --git a/tests/bugs162/pr163005/ProblemAspect.java b/tests/bugs162/pr163005/ProblemAspect.java
new file mode 100644 (file)
index 0000000..e9cd598
--- /dev/null
@@ -0,0 +1,13 @@
+public aspect ProblemAspect {
+
+        pointcut init(): initialization(Object+.new(..));
+
+        pointcut staticinit(): staticinitialization(Object+);
+
+        Class around(String className): cflowbelow(init() || staticinit()) &&
+call(Class Class.forName(String)) && args(className) {
+                System.out.println("Test");
+                return proceed(className);
+
+        }
+}
diff --git a/tests/bugs162/pr163005/SomeClass.java b/tests/bugs162/pr163005/SomeClass.java
new file mode 100644 (file)
index 0000000..d9abe36
--- /dev/null
@@ -0,0 +1,4 @@
+public class SomeClass implements SomeInterface {
+  public static void main(String []argv) {}
+}
+
diff --git a/tests/bugs162/pr163005/SomeInterface.java b/tests/bugs162/pr163005/SomeInterface.java
new file mode 100644 (file)
index 0000000..dd9e813
--- /dev/null
@@ -0,0 +1,4 @@
+public interface SomeInterface {
+        Class ADAPTER = SomeInterface.class;
+}
+