aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authoraclement <aclement>2007-01-15 08:46:37 +0000
committeraclement <aclement>2007-01-15 08:46:37 +0000
commitfb86dd4ca2edac7e1eb639cfde1d4b2a4f450457 (patch)
treee6818e0318149401425ece879c77360aa698b102 /ajde
parent1e76ec3f7e15bb1c943a2baec3f6ade6c9a7745d (diff)
downloadaspectj-fb86dd4ca2edac7e1eb639cfde1d4b2a4f450457.tar.gz
aspectj-fb86dd4ca2edac7e1eb639cfde1d4b2a4f450457.zip
148190#32
Diffstat (limited to 'ajde')
-rw-r--r--ajde/testdata/ReweavableTest/.cvsignore1
-rw-r--r--ajde/testdata/ReweavableTest/CalculatePI.java26
-rw-r--r--ajde/testdata/ReweavableTest/Logger.aj11
-rw-r--r--ajde/testdata/ReweavableTest/NonReweavable1.lst5
-rw-r--r--ajde/testdata/ReweavableTest/Reweavable1.lst4
-rw-r--r--ajde/testdata/ReweavableTest/Reweavable2.lst3
-rw-r--r--ajde/testdata/ReweavableTest/ReweavableCompress1.lst5
-rw-r--r--ajde/testdata/ReweavableTest/Second.lst2
-rw-r--r--ajde/testdata/ReweavableTest/SecondAspect.aj5
-rw-r--r--ajde/testdata/ReweavableTest/TJP1.lst4
-rw-r--r--ajde/testdata/ReweavableTest/TJP2.lst2
-rw-r--r--ajde/testdata/ReweavableTest/ThirdAspect.aj5
-rw-r--r--ajde/testdata/ReweavableTest/tjp/Demo.java38
-rw-r--r--ajde/testdata/ReweavableTest/tjp/GetInfo.java50
14 files changed, 0 insertions, 161 deletions
diff --git a/ajde/testdata/ReweavableTest/.cvsignore b/ajde/testdata/ReweavableTest/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/ajde/testdata/ReweavableTest/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/ajde/testdata/ReweavableTest/CalculatePI.java b/ajde/testdata/ReweavableTest/CalculatePI.java
deleted file mode 100644
index 84ae08583..000000000
--- a/ajde/testdata/ReweavableTest/CalculatePI.java
+++ /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
index b41c8842f..000000000
--- a/ajde/testdata/ReweavableTest/Logger.aj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-public aspect Logger {
-
- after(): call(* approximate(..)) {
- if (CalculatePI.iteration%10000==0)
- System.out.println("Approximation is now:"+
- (CalculatePI.inCircle/CalculatePI.inSquare)*4.0f);
- }
-
-} \ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/NonReweavable1.lst b/ajde/testdata/ReweavableTest/NonReweavable1.lst
deleted file mode 100644
index ee14b96a0..000000000
--- a/ajde/testdata/ReweavableTest/NonReweavable1.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-CalculatePI.java
-Logger.aj
--verbose
--noExit
--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
index c40df5e4c..000000000
--- a/ajde/testdata/ReweavableTest/Reweavable1.lst
+++ /dev/null
@@ -1,4 +0,0 @@
-CalculatePI.java
-Logger.aj
--verbose
--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
index fd7b77fd5..000000000
--- a/ajde/testdata/ReweavableTest/Reweavable2.lst
+++ /dev/null
@@ -1,3 +0,0 @@
-SecondAspect.aj
--verbose
--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
index af8fc60eb..000000000
--- a/ajde/testdata/ReweavableTest/ReweavableCompress1.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-CalculatePI.java
-Logger.aj
--Xreweavable:compress
--verbose
--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
index 94f078b58..000000000
--- a/ajde/testdata/ReweavableTest/Second.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-Logger.aj
--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
index 413f4969e..000000000
--- a/ajde/testdata/ReweavableTest/SecondAspect.aj
+++ /dev/null
@@ -1,5 +0,0 @@
-
-public aspect SecondAspect {
-
- declare parents: Logger implements java.io.Serializable;
-} \ No newline at end of file
diff --git a/ajde/testdata/ReweavableTest/TJP1.lst b/ajde/testdata/ReweavableTest/TJP1.lst
deleted file mode 100644
index 63ef2b2d1..000000000
--- a/ajde/testdata/ReweavableTest/TJP1.lst
+++ /dev/null
@@ -1,4 +0,0 @@
-tjp/Demo.java
-tjp/GetInfo.java
--verbose
--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
index b125523a1..000000000
--- a/ajde/testdata/ReweavableTest/TJP2.lst
+++ /dev/null
@@ -1,2 +0,0 @@
--verbose
--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
index c6c6b1a43..000000000
--- a/ajde/testdata/ReweavableTest/ThirdAspect.aj
+++ /dev/null
@@ -1,5 +0,0 @@
-
-public aspect ThirdAspect {
-
- int CalculatePI.x;
-} \ 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
index c4a4f057c..000000000
--- a/ajde/testdata/ReweavableTest/tjp/Demo.java
+++ /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
index 458acb56f..000000000
--- a/ajde/testdata/ReweavableTest/tjp/GetInfo.java
+++ /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]);
- }
- }
-}