aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-24 22:06:08 +0000
committeraclement <aclement>2009-03-24 22:06:08 +0000
commite089e8449b8bdbf5e31db78a4533deb9addd6634 (patch)
treeefee7f783ab247d58e736f8b949b7ec6ed176581 /tests/features164
parent691df674af216708a7a5f12dba6a5de1a797a448 (diff)
downloadaspectj-e089e8449b8bdbf5e31db78a4533deb9addd6634.tar.gz
aspectj-e089e8449b8bdbf5e31db78a4533deb9addd6634.zip
89009: joinpoint ids
Diffstat (limited to 'tests/features164')
-rw-r--r--tests/features164/joinpointid/Driver.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/features164/joinpointid/Driver.java b/tests/features164/joinpointid/Driver.java
new file mode 100644
index 000000000..998087ac4
--- /dev/null
+++ b/tests/features164/joinpointid/Driver.java
@@ -0,0 +1,26 @@
+public class Driver {
+ public static void main(String[]argv) {
+ new A().mone();
+ new A().mtwo();
+ new A().mone();
+ new A().mtwo();
+ new A().mone();
+ new A().mtwo();
+ }
+}
+
+class A {
+ public void mone() {}
+ public void mtwo() {}
+}
+
+aspect X pertypewithin(*) {
+
+ int[] state = new int[5];
+
+ before(): execution(* A.*(..)) {
+ int id = thisJoinPointStaticPart.getId();
+ System.out.println("At "+thisJoinPoint.getSignature()+" id="+id+" state="+state[id]);
+ state[id]++;
+ }
+}