aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ltw
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-14 07:23:40 +0000
committeraclement <aclement>2005-10-14 07:23:40 +0000
commit8982544f13eb5cb082ca19db2bd2c5f77b1e5965 (patch)
treed7e4c96b17ce76331686fc3cab53326d0087f039 /tests/ltw
parent51a0fe4edd56a626ef5570e43bd2225be0dcb4dd (diff)
downloadaspectj-8982544f13eb5cb082ca19db2bd2c5f77b1e5965.tar.gz
aspectj-8982544f13eb5cb082ca19db2bd2c5f77b1e5965.zip
Code for enhancement 107741: Updated WeavingURLClassLoader (thanks to Matthew Webster for the patch)
Diffstat (limited to 'tests/ltw')
-rw-r--r--tests/ltw/Aspect1.aj19
-rw-r--r--tests/ltw/Aspect2.aj19
-rw-r--r--tests/ltw/Main.java28
-rw-r--r--tests/ltw/aop-ltwreweavable.xml6
4 files changed, 72 insertions, 0 deletions
diff --git a/tests/ltw/Aspect1.aj b/tests/ltw/Aspect1.aj
new file mode 100644
index 000000000..173cb8603
--- /dev/null
+++ b/tests/ltw/Aspect1.aj
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster initial implementation
+ *******************************************************************************/
+import org.aspectj.lang.JoinPoint;
+
+public aspect Aspect1 {
+
+ before () : execution(void Main.test1()) {
+ System.err.println("Aspect1.before_" + thisJoinPoint.getSignature().getName());
+ }
+}
diff --git a/tests/ltw/Aspect2.aj b/tests/ltw/Aspect2.aj
new file mode 100644
index 000000000..519a47eeb
--- /dev/null
+++ b/tests/ltw/Aspect2.aj
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster initial implementation
+ *******************************************************************************/
+import org.aspectj.lang.JoinPoint;
+
+public aspect Aspect2 {
+
+ before () : execution(void Main.test2()){
+ System.err.println("Aspect2.before_" + thisJoinPoint.getSignature().getName());
+ }
+}
diff --git a/tests/ltw/Main.java b/tests/ltw/Main.java
new file mode 100644
index 000000000..fca018ac9
--- /dev/null
+++ b/tests/ltw/Main.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster initial implementation
+ *******************************************************************************/
+
+public class Main {
+
+ public void test1 () {
+ System.out.println("Main.test1");
+ }
+
+ public void test2 () {
+ System.out.println("Main.test2");
+ }
+
+ public static void main (String[] args) {
+ System.out.println("Main.main");
+ new Main().test1();
+ new Main().test2();
+ }
+}
diff --git a/tests/ltw/aop-ltwreweavable.xml b/tests/ltw/aop-ltwreweavable.xml
new file mode 100644
index 000000000..9afd80e02
--- /dev/null
+++ b/tests/ltw/aop-ltwreweavable.xml
@@ -0,0 +1,6 @@
+<aspectj>
+ <aspect name="Aspect1"/>
+ <aspect name="Aspect2"/>
+
+ <weaver options="-showWeaveInfo"/>
+</aspectj>