aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/PR590a.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/PR590a.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/PR590a.java')
-rw-r--r--tests/new/PR590a.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/new/PR590a.java b/tests/new/PR590a.java
new file mode 100644
index 000000000..e7e8d3a85
--- /dev/null
+++ b/tests/new/PR590a.java
@@ -0,0 +1,37 @@
+import org.aspectj.testing.Tester;
+
+public class PR590a {
+ public static void main (String args []) {
+ staticMethod ();
+ new PR590a().instanceMethod("bar");
+ }
+
+ public static String staticMethod () {
+ return null;
+ }
+
+ public String instanceMethod(String a) {
+ return "foo";
+ }
+}
+
+aspect A {
+ static Object fieldX = Boolean.TRUE;
+ //static Object Integer = Boolean.TRUE; // just to screw with you
+
+ pointcut pc(Object s): call(!static String PR590a.*(..)) && args(s);
+
+ before(): target(Byte) { } //sanity check
+ //before(): target(BlurghXXX) { } //sanity check, warning in -Xlint
+
+
+
+ after () returning (Object s): pc(s) {} //ERR CE 29
+
+ after () throwing (Object e): pc(e) {} //ERR CE 31
+
+ // before(): target(fieldX) { } //ERR, but not handled yet
+
+ //before(): target(Integer) { } //ERR -- finds field rather than type, but not handled yet
+}
+