summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/ajdk/PointcutInGenericClassExample.aj
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-18 09:31:26 +0000
committeracolyer <acolyer>2005-08-18 09:31:26 +0000
commitf7a8c2e721fa01b1b78607a37e57e983f5349062 (patch)
tree66e395409f6612880afa5fba9334a807b0300e9c /tests/java5/generics/ajdk/PointcutInGenericClassExample.aj
parente88e1a38c43abbfabdb407d51a3dd122afede672 (diff)
downloadaspectj-f7a8c2e721fa01b1b78607a37e57e983f5349062.tar.gz
aspectj-f7a8c2e721fa01b1b78607a37e57e983f5349062.zip
tests for examples in the ajdk generics chapter
Diffstat (limited to 'tests/java5/generics/ajdk/PointcutInGenericClassExample.aj')
-rw-r--r--tests/java5/generics/ajdk/PointcutInGenericClassExample.aj31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/java5/generics/ajdk/PointcutInGenericClassExample.aj b/tests/java5/generics/ajdk/PointcutInGenericClassExample.aj
new file mode 100644
index 000000000..14740403a
--- /dev/null
+++ b/tests/java5/generics/ajdk/PointcutInGenericClassExample.aj
@@ -0,0 +1,31 @@
+public class PointcutInGenericClassExample<T> {
+
+ public pointcut foo() : execution(* T.*(..));
+
+}
+
+aspect A {
+
+ declare warning : PointcutInGenericClassExample<C>.foo()
+ : "parameterized with C";
+
+ declare warning : PointcutInGenericClassExample<D>.foo()
+ : "parameterized with D";
+
+// declare warning : PointcutInGenericClassExample.foo()
+// : "raw";
+
+
+}
+
+class C {
+
+ void bar() {}
+
+}
+
+class D {
+
+ void goo() {}
+
+} \ No newline at end of file