]> source.dussan.org Git - aspectj.git/commitdiff
148190#32
authoraclement <aclement>
Mon, 15 Jan 2007 08:46:37 +0000 (08:46 +0000)
committeraclement <aclement>
Mon, 15 Jan 2007 08:46:37 +0000 (08:46 +0000)
14 files changed:
ajde/testdata/ReweavableTest/.cvsignore [deleted file]
ajde/testdata/ReweavableTest/CalculatePI.java [deleted file]
ajde/testdata/ReweavableTest/Logger.aj [deleted file]
ajde/testdata/ReweavableTest/NonReweavable1.lst [deleted file]
ajde/testdata/ReweavableTest/Reweavable1.lst [deleted file]
ajde/testdata/ReweavableTest/Reweavable2.lst [deleted file]
ajde/testdata/ReweavableTest/ReweavableCompress1.lst [deleted file]
ajde/testdata/ReweavableTest/Second.lst [deleted file]
ajde/testdata/ReweavableTest/SecondAspect.aj [deleted file]
ajde/testdata/ReweavableTest/TJP1.lst [deleted file]
ajde/testdata/ReweavableTest/TJP2.lst [deleted file]
ajde/testdata/ReweavableTest/ThirdAspect.aj [deleted file]
ajde/testdata/ReweavableTest/tjp/Demo.java [deleted file]
ajde/testdata/ReweavableTest/tjp/GetInfo.java [deleted file]

diff --git a/ajde/testdata/ReweavableTest/.cvsignore b/ajde/testdata/ReweavableTest/.cvsignore
deleted file mode 100644 (file)
index ba077a4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/ajde/testdata/ReweavableTest/CalculatePI.java b/ajde/testdata/ReweavableTest/CalculatePI.java
deleted file mode 100644 (file)
index 84ae085..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-import java.util.Random;
-
-public class CalculatePI {
-       
-       static Random r = new Random();
-       static double piApproximation = 1.0f;
-       static int repetitions = 500000;
-       static int iteration = 0;
-       static double inSquare = 0;
-       static double inCircle = 0;
-               
-       public static void main(String[] args) {
-         for (iteration = 0;iteration<repetitions;iteration++) approximate();
-         piApproximation = (inCircle/inSquare)*4.0f;
-         System.out.println("After "+repetitions+" iterations, pi is estimated to be "+piApproximation);
-       }
-       
-       public static void approximate() {
-               double x = r.nextDouble();
-               double y = r.nextDouble();
-               inSquare++;
-               if (x*x + y*y < 1) {inCircle++;}
-       }
-
-       
-}
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/Logger.aj b/ajde/testdata/ReweavableTest/Logger.aj
deleted file mode 100644 (file)
index b41c884..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-\r
-\r
-public aspect Logger {\r
-  \r
-  after(): call(* approximate(..)) {\r
-       if (CalculatePI.iteration%10000==0) \r
-         System.out.println("Approximation is now:"+\r
-           (CalculatePI.inCircle/CalculatePI.inSquare)*4.0f);\r
-  }\r
-  \r
-}
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/NonReweavable1.lst b/ajde/testdata/ReweavableTest/NonReweavable1.lst
deleted file mode 100644 (file)
index ee14b96..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CalculatePI.java\r
-Logger.aj\r
--verbose\r
--noExit\r
--XnotReweavable
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/Reweavable1.lst b/ajde/testdata/ReweavableTest/Reweavable1.lst
deleted file mode 100644 (file)
index c40df5e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CalculatePI.java\r
-Logger.aj\r
--verbose\r
--noExit
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/Reweavable2.lst b/ajde/testdata/ReweavableTest/Reweavable2.lst
deleted file mode 100644 (file)
index fd7b77f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-SecondAspect.aj\r
--verbose\r
--noExit
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/ReweavableCompress1.lst b/ajde/testdata/ReweavableTest/ReweavableCompress1.lst
deleted file mode 100644 (file)
index af8fc60..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CalculatePI.java\r
-Logger.aj\r
--Xreweavable:compress\r
--verbose\r
--noExit
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/Second.lst b/ajde/testdata/ReweavableTest/Second.lst
deleted file mode 100644 (file)
index 94f078b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Logger.aj\r
--verbose
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/SecondAspect.aj b/ajde/testdata/ReweavableTest/SecondAspect.aj
deleted file mode 100644 (file)
index 413f496..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-\r
-public aspect SecondAspect {\r
-\r
-  declare parents: Logger implements java.io.Serializable;\r
-}
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/TJP1.lst b/ajde/testdata/ReweavableTest/TJP1.lst
deleted file mode 100644 (file)
index 63ef2b2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-tjp/Demo.java\r
-tjp/GetInfo.java\r
--verbose\r
--noExit
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/TJP2.lst b/ajde/testdata/ReweavableTest/TJP2.lst
deleted file mode 100644 (file)
index b125523..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--verbose\r
--noExit
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/ThirdAspect.aj b/ajde/testdata/ReweavableTest/ThirdAspect.aj
deleted file mode 100644 (file)
index c6c6b1a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-\r
-public aspect ThirdAspect {\r
-\r
-       int CalculatePI.x;\r
-}
\ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/tjp/Demo.java b/ajde/testdata/ReweavableTest/tjp/Demo.java
deleted file mode 100644 (file)
index c4a4f05..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/*
-
-Copyright (c) Xerox Corporation 1998-2002.  All rights reserved.
-
-Use and copying of this software and preparation of derivative works based
-upon this software are permitted.  Any distribution of this software or
-derivative works must comply with all applicable United States export control
-laws.
-
-This software is made available AS IS, and Xerox Corporation makes no warranty
-about the software, its performance or its conformity to any specification.
-
-*/
-package tjp;
-
-public class Demo {
-       static Demo d;
-
-       public static void main(String[] args){
-               new Demo().go();
-       }
-
-       void go(){
-               d = new Demo();
-               d.foo(1,d);
-               System.out.println(d.bar(new Integer(3)));
-       }
-
-       void foo(int i, Object o){
-               System.out.println("Demo.foo(" + i + ", " + o + ")\n");
-       }
-
-       String bar (Integer j){
-               System.out.println("Demo.bar(" + j + ")\n");
-               return "Demo.bar(" + j  + ")";
-       }
-}
diff --git a/ajde/testdata/ReweavableTest/tjp/GetInfo.java b/ajde/testdata/ReweavableTest/tjp/GetInfo.java
deleted file mode 100644 (file)
index 458acb5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-
-/*
-Copyright (c) Xerox Corporation 1998-2002.  All rights reserved.
-
-Use and copying of this software and preparation of derivative works based
-upon this software are permitted.  Any distribution of this software or
-derivative works must comply with all applicable United States export control
-laws.
-
-This software is made available AS IS, and Xerox Corporation makes no warranty
-about the software, its performance or its conformity to any specification.
-*/
-
-package tjp;
-
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.reflect.CodeSignature;
-
-aspect GetInfo {
-
-   static final void println(String s){ System.out.println(s); }
-
-   pointcut goCut(): cflow(this(Demo) && execution(void go()));
-
-   pointcut demoExecs(): within(Demo) && execution(* *(..));
-
-   Object around(): demoExecs() && !execution(* go()) && goCut() {
-         println("Intercepted message: " +
-                 thisJoinPointStaticPart.getSignature().getName());
-         println("in class: " +
-                 thisJoinPointStaticPart.getSignature().getDeclaringType().getName());
-         printParameters(thisJoinPoint);
-         println("Running original method: \n" );
-         Object result = proceed();
-         println("  result: " + result );
-         return result;
-   }
-
-   static private void printParameters(JoinPoint jp) {
-         println("Arguments: " );
-         Object[] args = jp.getArgs();
-         String[] names = ((CodeSignature)jp.getSignature()).getParameterNames();
-         Class[] types = ((CodeSignature)jp.getSignature()).getParameterTypes();
-         for (int i = 0; i < args.length; i++) {
-                println("  "  + i + ". " + names[i] +
-                        " : " +            types[i].getName() +
-                        " = " +            args[i]);
-         }
-   }
-}