aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs169/pr292584
diff options
context:
space:
mode:
authoraclement <aclement>2010-01-25 22:47:06 +0000
committeraclement <aclement>2010-01-25 22:47:06 +0000
commitd36b87d2f0b22991ffc8d111367fdb7c97943477 (patch)
tree85355c0aedc8e8b4ca4510f5d948e9bf94cc842f /tests/bugs169/pr292584
parent046261e20078530352a063c6c1eef9f44bb98f23 (diff)
downloadaspectj-d36b87d2f0b22991ffc8d111367fdb7c97943477.tar.gz
aspectj-d36b87d2f0b22991ffc8d111367fdb7c97943477.zip
292584, 295491, 298388: testcode
Diffstat (limited to 'tests/bugs169/pr292584')
-rw-r--r--tests/bugs169/pr292584/AbstractAspect.java13
-rw-r--r--tests/bugs169/pr292584/ClassWithJoinPoint.java17
-rw-r--r--tests/bugs169/pr292584/ConcreteAspect.java10
3 files changed, 40 insertions, 0 deletions
diff --git a/tests/bugs169/pr292584/AbstractAspect.java b/tests/bugs169/pr292584/AbstractAspect.java
new file mode 100644
index 000000000..767be601f
--- /dev/null
+++ b/tests/bugs169/pr292584/AbstractAspect.java
@@ -0,0 +1,13 @@
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public abstract class AbstractAspect {
+ @Around("execution(* ClassWithJoinPoint.getValue(..))")
+ public Object ClassWithJoinPoint_getValue() {
+ return getValueReplacement();
+ }
+
+ protected abstract Boolean getValueReplacement();
+} \ No newline at end of file
diff --git a/tests/bugs169/pr292584/ClassWithJoinPoint.java b/tests/bugs169/pr292584/ClassWithJoinPoint.java
new file mode 100644
index 000000000..32b646fc8
--- /dev/null
+++ b/tests/bugs169/pr292584/ClassWithJoinPoint.java
@@ -0,0 +1,17 @@
+
+public class ClassWithJoinPoint {
+ public Boolean getValue() {
+ return Boolean.FALSE;
+ }
+
+ public static void main(String[] arguments) {
+/*
+ System.out.println("Testing aspect style (should print \"true\"):");
+ System.out.println(new aspect_style.ClassWithJoinPoint().getValue());
+
+ System.out.println();
+*/
+ System.out.println("Testing annotation style (should print \"true\"):");
+ System.out.println(new ClassWithJoinPoint().getValue());
+ }
+}
diff --git a/tests/bugs169/pr292584/ConcreteAspect.java b/tests/bugs169/pr292584/ConcreteAspect.java
new file mode 100644
index 000000000..0f0f02011
--- /dev/null
+++ b/tests/bugs169/pr292584/ConcreteAspect.java
@@ -0,0 +1,10 @@
+
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class ConcreteAspect extends AbstractAspect {
+ @Override
+ protected Boolean getValueReplacement() {
+ return Boolean.TRUE;
+ }
+}