aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features151/newarrayjoinpoint/Twelve.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features151/newarrayjoinpoint/Twelve.java')
-rw-r--r--tests/features151/newarrayjoinpoint/Twelve.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/features151/newarrayjoinpoint/Twelve.java b/tests/features151/newarrayjoinpoint/Twelve.java
new file mode 100644
index 000000000..f4f802db5
--- /dev/null
+++ b/tests/features151/newarrayjoinpoint/Twelve.java
@@ -0,0 +1,25 @@
+// writing general advice for multiple array types
+
+public class Twelve {
+
+ static int[] is1;
+ static Integer[] is2;
+ static String[][] strs;
+
+ public static void main(String []argv) {
+ is1 = new int[5];
+ is2 = new Integer[8];
+ strs = new String[4][8];
+ }
+}
+
+aspect X {
+
+ after() returning(Object o): call(*.new(..)) && within(Twelve) {
+ System.err.println("It is "+o.getClass());
+ System.err.println("Is it an array? "+o.getClass().isArray());
+ System.err.println("Component type is "+o.getClass().getComponentType());
+ System.err.println("--");
+ }
+
+} \ No newline at end of file