aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612
diff options
context:
space:
mode:
authoraclement <aclement>2011-06-30 17:30:33 +0000
committeraclement <aclement>2011-06-30 17:30:33 +0000
commit654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c (patch)
tree9abeff69de2ea933c6154c9d5adf50a82bbb2b54 /tests/bugs1612
parent2302e94e25862a540ccab34b8f4707081ec7fc06 (diff)
downloadaspectj-654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c.tar.gz
aspectj-654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c.zip
350800
Diffstat (limited to 'tests/bugs1612')
-rw-r--r--tests/bugs1612/pr350800/AbstractAdapter.java9
-rw-r--r--tests/bugs1612/pr350800/AbstractProbingAspect.java22
-rw-r--r--tests/bugs1612/pr350800/Adapter.java9
-rw-r--r--tests/bugs1612/pr350800/ProbingAspect.java16
-rw-r--r--tests/bugs1612/pr350800_2/AbstractAdapter.java9
-rw-r--r--tests/bugs1612/pr350800_2/AbstractProbingAspect.java20
-rw-r--r--tests/bugs1612/pr350800_2/Adapter.java9
-rw-r--r--tests/bugs1612/pr350800_2/ProbingAspect.java14
-rw-r--r--tests/bugs1612/pr350800_3/AbstractAdapter.java9
-rw-r--r--tests/bugs1612/pr350800_3/AbstractProbingAspect.java24
-rw-r--r--tests/bugs1612/pr350800_3/Adapter.java14
-rw-r--r--tests/bugs1612/pr350800_3/ProbingAspect.java16
12 files changed, 171 insertions, 0 deletions
diff --git a/tests/bugs1612/pr350800/AbstractAdapter.java b/tests/bugs1612/pr350800/AbstractAdapter.java
new file mode 100644
index 000000000..660bb1cd2
--- /dev/null
+++ b/tests/bugs1612/pr350800/AbstractAdapter.java
@@ -0,0 +1,9 @@
+package test.aop;
+
+import java.io.Serializable;
+
+public abstract class AbstractAdapter<T extends Serializable> {
+
+ protected abstract T execute(T message);
+
+}
diff --git a/tests/bugs1612/pr350800/AbstractProbingAspect.java b/tests/bugs1612/pr350800/AbstractProbingAspect.java
new file mode 100644
index 000000000..7ac8acc9e
--- /dev/null
+++ b/tests/bugs1612/pr350800/AbstractProbingAspect.java
@@ -0,0 +1,22 @@
+package test.aop;
+
+import java.io.Serializable;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public abstract class AbstractProbingAspect<T extends Serializable> {
+
+ @Pointcut("")
+ protected abstract void adapterMethodExecution();
+
+ @Around("adapterMethodExecution()")
+ public T around(ProceedingJoinPoint thisJoinPoint) throws Throwable {
+ return (T) thisJoinPoint.proceed();
+ }
+
+ protected abstract String extractFunctionName(T command);
+}
diff --git a/tests/bugs1612/pr350800/Adapter.java b/tests/bugs1612/pr350800/Adapter.java
new file mode 100644
index 000000000..0f1015f69
--- /dev/null
+++ b/tests/bugs1612/pr350800/Adapter.java
@@ -0,0 +1,9 @@
+package test.aop;
+
+public class Adapter extends AbstractAdapter<String> {
+
+ @Override
+ public String execute(String message) {
+ return message;
+ }
+}
diff --git a/tests/bugs1612/pr350800/ProbingAspect.java b/tests/bugs1612/pr350800/ProbingAspect.java
new file mode 100644
index 000000000..51d410e66
--- /dev/null
+++ b/tests/bugs1612/pr350800/ProbingAspect.java
@@ -0,0 +1,16 @@
+package test.aop;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public class ProbingAspect extends AbstractProbingAspect<String> {
+
+ @Pointcut("execution(String test.aop.Adapter.execute(String))")
+ protected void adapterMethodExecution() {};
+
+ @Override
+ protected String extractFunctionName(String command) {
+ return String.valueOf(command);
+ }
+}
diff --git a/tests/bugs1612/pr350800_2/AbstractAdapter.java b/tests/bugs1612/pr350800_2/AbstractAdapter.java
new file mode 100644
index 000000000..660bb1cd2
--- /dev/null
+++ b/tests/bugs1612/pr350800_2/AbstractAdapter.java
@@ -0,0 +1,9 @@
+package test.aop;
+
+import java.io.Serializable;
+
+public abstract class AbstractAdapter<T extends Serializable> {
+
+ protected abstract T execute(T message);
+
+}
diff --git a/tests/bugs1612/pr350800_2/AbstractProbingAspect.java b/tests/bugs1612/pr350800_2/AbstractProbingAspect.java
new file mode 100644
index 000000000..b6cb370eb
--- /dev/null
+++ b/tests/bugs1612/pr350800_2/AbstractProbingAspect.java
@@ -0,0 +1,20 @@
+package test.aop;
+
+import java.io.Serializable;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+public abstract aspect AbstractProbingAspect<T extends Serializable> {
+
+ abstract pointcut adapterMethodExecution();
+
+
+ T around(): adapterMethodExecution() {
+ return (T) proceed();
+ }
+
+ protected abstract String extractFunctionName(T command);
+}
diff --git a/tests/bugs1612/pr350800_2/Adapter.java b/tests/bugs1612/pr350800_2/Adapter.java
new file mode 100644
index 000000000..0f1015f69
--- /dev/null
+++ b/tests/bugs1612/pr350800_2/Adapter.java
@@ -0,0 +1,9 @@
+package test.aop;
+
+public class Adapter extends AbstractAdapter<String> {
+
+ @Override
+ public String execute(String message) {
+ return message;
+ }
+}
diff --git a/tests/bugs1612/pr350800_2/ProbingAspect.java b/tests/bugs1612/pr350800_2/ProbingAspect.java
new file mode 100644
index 000000000..01e24e3c0
--- /dev/null
+++ b/tests/bugs1612/pr350800_2/ProbingAspect.java
@@ -0,0 +1,14 @@
+package test.aop;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+public aspect ProbingAspect extends AbstractProbingAspect<String> {
+
+ pointcut adapterMethodExecution(): execution(String test.aop.Adapter.execute(String));
+
+ @Override
+ protected String extractFunctionName(String command) {
+ return String.valueOf(command);
+ }
+}
diff --git a/tests/bugs1612/pr350800_3/AbstractAdapter.java b/tests/bugs1612/pr350800_3/AbstractAdapter.java
new file mode 100644
index 000000000..660bb1cd2
--- /dev/null
+++ b/tests/bugs1612/pr350800_3/AbstractAdapter.java
@@ -0,0 +1,9 @@
+package test.aop;
+
+import java.io.Serializable;
+
+public abstract class AbstractAdapter<T extends Serializable> {
+
+ protected abstract T execute(T message);
+
+}
diff --git a/tests/bugs1612/pr350800_3/AbstractProbingAspect.java b/tests/bugs1612/pr350800_3/AbstractProbingAspect.java
new file mode 100644
index 000000000..bd25c5ba4
--- /dev/null
+++ b/tests/bugs1612/pr350800_3/AbstractProbingAspect.java
@@ -0,0 +1,24 @@
+package test.aop;
+
+import java.io.Serializable;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public abstract class AbstractProbingAspect<T extends Serializable> {
+
+ @Pointcut("")
+ protected abstract void adapterMethodExecution();
+
+ @Around("adapterMethodExecution()")
+ public T around(ProceedingJoinPoint thisJoinPoint) throws Throwable {
+ T t = (T) thisJoinPoint.proceed();
+ System.out.println(">"+extractFunctionName(t));
+ return t;
+ }
+
+ protected abstract String extractFunctionName(T command);
+}
diff --git a/tests/bugs1612/pr350800_3/Adapter.java b/tests/bugs1612/pr350800_3/Adapter.java
new file mode 100644
index 000000000..5a359b6ba
--- /dev/null
+++ b/tests/bugs1612/pr350800_3/Adapter.java
@@ -0,0 +1,14 @@
+package test.aop;
+
+public class Adapter extends AbstractAdapter<String> {
+
+ @Override
+ public String execute(String message) {
+ return message;
+ }
+
+
+ public static void main(String []argv) {
+ new Adapter().execute("hello");
+ }
+}
diff --git a/tests/bugs1612/pr350800_3/ProbingAspect.java b/tests/bugs1612/pr350800_3/ProbingAspect.java
new file mode 100644
index 000000000..51d410e66
--- /dev/null
+++ b/tests/bugs1612/pr350800_3/ProbingAspect.java
@@ -0,0 +1,16 @@
+package test.aop;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public class ProbingAspect extends AbstractProbingAspect<String> {
+
+ @Pointcut("execution(String test.aop.Adapter.execute(String))")
+ protected void adapterMethodExecution() {};
+
+ @Override
+ protected String extractFunctionName(String command) {
+ return String.valueOf(command);
+ }
+}