diff options
author | aclement <aclement> | 2011-06-30 17:30:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-06-30 17:30:33 +0000 |
commit | 654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c (patch) | |
tree | 9abeff69de2ea933c6154c9d5adf50a82bbb2b54 /tests/bugs1612/pr350800 | |
parent | 2302e94e25862a540ccab34b8f4707081ec7fc06 (diff) | |
download | aspectj-654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c.tar.gz aspectj-654dbbc6587f8117e7e2e7daf9bf6eab1bfba39c.zip |
350800
Diffstat (limited to 'tests/bugs1612/pr350800')
-rw-r--r-- | tests/bugs1612/pr350800/AbstractAdapter.java | 9 | ||||
-rw-r--r-- | tests/bugs1612/pr350800/AbstractProbingAspect.java | 22 | ||||
-rw-r--r-- | tests/bugs1612/pr350800/Adapter.java | 9 | ||||
-rw-r--r-- | tests/bugs1612/pr350800/ProbingAspect.java | 16 |
4 files changed, 56 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); + } +} |