aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164
diff options
context:
space:
mode:
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]++;
+ }
+}