Index: reweavable/Advisable.java
===================================================================
RCS file: reweavable/Advisable.java
diff -N reweavable/Advisable.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ reweavable/Advisable.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,4 @@
+public interface Advisable {
+
+ public void addJoinPoint (String name);
+}
Index: reweavable/Aspect1.aj
===================================================================
RCS file: reweavable/Aspect1.aj
diff -N reweavable/Aspect1.aj
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ reweavable/Aspect1.aj 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+public aspect Aspect1 {
+
+ before (Advisable a) : execution(void test1()) && this(a){
+ System.err.println(thisJoinPoint);
+ a.addJoinPoint(thisJoinPoint.getSignature().getName());
+ }
+}
Index: reweavable/Aspect2.aj
===================================================================
RCS file: reweavable/Aspect2.aj
diff -N reweavable/Aspect2.aj
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ reweavable/Aspect2.aj 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+public aspect Aspect2 {
+
+ before (Advisable a) : execution(void test2()) && this(a){
+ System.err.println(thisJoinPoint);
+ a.addJoinPoint(thisJoinPoint.getSignature().getName());
+ }
+}
Index: reweavable/Main.java
===================================================================
RCS file: reweavable/Main.java
diff -N reweavable/Main.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ reweavable/Main.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,28 @@
+import java.util.*;
+
+public class Main implements Advisable {
+
+ private static List joinPoints = new ArrayList();
+
+ public void test1 () {
+
+ }
+
+ public void test2 () {
+
+ }
+
+ public void addJoinPoint (String name) {
+ joinPoints.add(name);
+ }
+
+ public static void main (String[] args) {
+ System.err.println("? Main.main()");
+ joinPoints = new ArrayList();
+ new Main().test1();
+ new Main().test2();
+ if (joinPoints.size() != 2) {
+ throw new RuntimeException("size=" + joinPoints.size());
+ }
+ }
+}
Index: src/org/aspectj/systemtest/reweavable/ReweavableTests.java
===================================================================
RCS file: src/org/aspectj/systemtest/reweavable/ReweavableTests.java
diff -N src/org/aspectj/systemtest/reweavable/ReweavableTests.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/aspectj/systemtest/reweavable/ReweavableTests.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,41 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * ******************************************************************/
+package org.aspectj.systemtest.reweavable;
+
+import java.io.File;
+import junit.framework.Test;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class ReweavableTests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(ReweavableTests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/reweavable/reweavable.xml");
+ }
+
+ public void test001(){
+ runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect");
+ }
+
+ public void test002(){
+ runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect - aspectpath");
+ }
+
+ public void test003(){
+ runTest("Ensure 1st aspect is rewoven when weaving 2nd aspect - classpath");
+ }
+
+}
+
Index: src/org/aspectj/systemtest/reweavable/reweavable-tests.xml
===================================================================
RCS file: src/org/aspectj/systemtest/reweavable/reweavable-tests.xml
diff -N src/org/aspectj/systemtest/reweavable/reweavable-tests.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/aspectj/systemtest/reweavable/reweavable-tests.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: src/org/aspectj/systemtest/reweavable/reweavable.xml
===================================================================
RCS file: src/org/aspectj/systemtest/reweavable/reweavable.xml
diff -N src/org/aspectj/systemtest/reweavable/reweavable.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/aspectj/systemtest/reweavable/reweavable.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,9 @@
+
+]>
+
+
+
+
+&tests;
+