diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs152/pr125480/AbstractMethods.aj | 31 | ||||
-rw-r--r-- | tests/bugs152/pr125480/AtAspectTestConcreteMethods.java | 6 | ||||
-rw-r--r-- | tests/bugs152/pr125480/ConcreteMethods.aj | 7 | ||||
-rw-r--r-- | tests/bugs152/pr125480/HelloWorld.java | 11 | ||||
-rw-r--r-- | tests/bugs152/pr125480/aop-tracing.xml | 10 | ||||
-rw-r--r-- | tests/bugs152/pr125480/case2/AbstractMethods.aj | 13 | ||||
-rw-r--r-- | tests/bugs152/pr125480/case2/AtAspectTestConcreteMethods.java | 6 | ||||
-rw-r--r-- | tests/bugs152/pr125480/case2/ConcreteMethods.aj | 7 | ||||
-rw-r--r-- | tests/bugs152/pr125480/case2/HelloWorld.java | 11 | ||||
-rw-r--r-- | tests/bugs152/pr125480/case2/aop-tracing.xml | 10 |
10 files changed, 112 insertions, 0 deletions
diff --git a/tests/bugs152/pr125480/AbstractMethods.aj b/tests/bugs152/pr125480/AbstractMethods.aj new file mode 100644 index 000000000..f252d8838 --- /dev/null +++ b/tests/bugs152/pr125480/AbstractMethods.aj @@ -0,0 +1,31 @@ +import org.aspectj.lang.annotation.*; + + +@Aspect +public abstract class AbstractMethods { + + @Pointcut + protected abstract void tracingScope(); + + @Before("tracingScope()") + public void doit() { + test(); + System.out.println("advice running"); + } + protected abstract void test(); +} + +/* +public abstract aspect AbstractMethods { + + protected abstract pointcut tracingScope (); + + before () : tracingScope () { + test(); + System.out.println("advice running"); + } + + protected abstract void test (); +// protected void test () {} +} +*/ diff --git a/tests/bugs152/pr125480/AtAspectTestConcreteMethods.java b/tests/bugs152/pr125480/AtAspectTestConcreteMethods.java new file mode 100644 index 000000000..90e4cc34e --- /dev/null +++ b/tests/bugs152/pr125480/AtAspectTestConcreteMethods.java @@ -0,0 +1,6 @@ +import org.aspectj.lang.annotation.Aspect; + +@Aspect +public class AtAspectTestConcreteMethods extends ConcreteMethods { + +} diff --git a/tests/bugs152/pr125480/ConcreteMethods.aj b/tests/bugs152/pr125480/ConcreteMethods.aj new file mode 100644 index 000000000..efc23b5d2 --- /dev/null +++ b/tests/bugs152/pr125480/ConcreteMethods.aj @@ -0,0 +1,7 @@ + + +public abstract aspect ConcreteMethods extends AbstractMethods { + + protected void test () {} + +} diff --git a/tests/bugs152/pr125480/HelloWorld.java b/tests/bugs152/pr125480/HelloWorld.java new file mode 100644 index 000000000..f741a2c0e --- /dev/null +++ b/tests/bugs152/pr125480/HelloWorld.java @@ -0,0 +1,11 @@ +public class HelloWorld { + + public static void main(String[] args) { + new HelloWorld().println(); + } + + public void println() { + System.out.print("Hello World!"); + } + +} diff --git a/tests/bugs152/pr125480/aop-tracing.xml b/tests/bugs152/pr125480/aop-tracing.xml new file mode 100644 index 000000000..2c805137b --- /dev/null +++ b/tests/bugs152/pr125480/aop-tracing.xml @@ -0,0 +1,10 @@ +<aspectj> + <aspects> + <concrete-aspect name="TraceHelloWorld" extends="ConcreteMethods"> + <pointcut name="tracingScope" expression="within(HelloWorld) AND call(* println(..))"/> + </concrete-aspect> + </aspects> + + <weaver options=""/> +</aspectj> + diff --git a/tests/bugs152/pr125480/case2/AbstractMethods.aj b/tests/bugs152/pr125480/case2/AbstractMethods.aj new file mode 100644 index 000000000..20e8a0315 --- /dev/null +++ b/tests/bugs152/pr125480/case2/AbstractMethods.aj @@ -0,0 +1,13 @@ + +public abstract aspect AbstractMethods { + + protected abstract pointcut tracingScope (); + + before () : tracingScope () { + test(); + System.out.println("advice running"); + } + + protected abstract void test (); +// protected void test () {} +} diff --git a/tests/bugs152/pr125480/case2/AtAspectTestConcreteMethods.java b/tests/bugs152/pr125480/case2/AtAspectTestConcreteMethods.java new file mode 100644 index 000000000..90e4cc34e --- /dev/null +++ b/tests/bugs152/pr125480/case2/AtAspectTestConcreteMethods.java @@ -0,0 +1,6 @@ +import org.aspectj.lang.annotation.Aspect; + +@Aspect +public class AtAspectTestConcreteMethods extends ConcreteMethods { + +} diff --git a/tests/bugs152/pr125480/case2/ConcreteMethods.aj b/tests/bugs152/pr125480/case2/ConcreteMethods.aj new file mode 100644 index 000000000..efc23b5d2 --- /dev/null +++ b/tests/bugs152/pr125480/case2/ConcreteMethods.aj @@ -0,0 +1,7 @@ + + +public abstract aspect ConcreteMethods extends AbstractMethods { + + protected void test () {} + +} diff --git a/tests/bugs152/pr125480/case2/HelloWorld.java b/tests/bugs152/pr125480/case2/HelloWorld.java new file mode 100644 index 000000000..f741a2c0e --- /dev/null +++ b/tests/bugs152/pr125480/case2/HelloWorld.java @@ -0,0 +1,11 @@ +public class HelloWorld { + + public static void main(String[] args) { + new HelloWorld().println(); + } + + public void println() { + System.out.print("Hello World!"); + } + +} diff --git a/tests/bugs152/pr125480/case2/aop-tracing.xml b/tests/bugs152/pr125480/case2/aop-tracing.xml new file mode 100644 index 000000000..2c805137b --- /dev/null +++ b/tests/bugs152/pr125480/case2/aop-tracing.xml @@ -0,0 +1,10 @@ +<aspectj> + <aspects> + <concrete-aspect name="TraceHelloWorld" extends="ConcreteMethods"> + <pointcut name="tracingScope" expression="within(HelloWorld) AND call(* println(..))"/> + </concrete-aspect> + </aspects> + + <weaver options=""/> +</aspectj> + |