aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features169
diff options
context:
space:
mode:
authoraclement <aclement>2010-06-07 23:50:36 +0000
committeraclement <aclement>2010-06-07 23:50:36 +0000
commitc23f4a9bbd3aa38b86c9a3d8eb0a353af4eff9c5 (patch)
tree32430138a075e310aba5baa4fdaee52a7d54d90e /tests/features169
parent0a9767cda824898846c6c815008ca384feab91da (diff)
downloadaspectj-c23f4a9bbd3aa38b86c9a3d8eb0a353af4eff9c5.tar.gz
aspectj-c23f4a9bbd3aa38b86c9a3d8eb0a353af4eff9c5.zip
itd inner classes
Diffstat (limited to 'tests/features169')
-rw-r--r--tests/features169/itdInnerTypes/Basic2.java9
-rw-r--r--tests/features169/itdInnerTypes/Choice.java28
-rw-r--r--tests/features169/itdInnerTypes/FieldAccess.java15
-rw-r--r--tests/features169/itdInnerTypes/MethodCall.java15
-rw-r--r--tests/features169/itdInnerTypes/OnAnnotation.java11
-rw-r--r--tests/features169/itdInnerTypes/OnEnum.java9
-rw-r--r--tests/features169/itdInnerTypes/OnInterface.java8
-rw-r--r--tests/features169/itdInnerTypes/OnlyStatic.java8
-rw-r--r--tests/features169/itdInnerTypes/Simplest.java4
-rw-r--r--tests/features169/itdInnerTypes/Simplest2.java7
-rw-r--r--tests/features169/itdInnerTypes/Simplest3.java12
-rw-r--r--tests/features169/itdInnerTypes/Simplest4.java15
12 files changed, 141 insertions, 0 deletions
diff --git a/tests/features169/itdInnerTypes/Basic2.java b/tests/features169/itdInnerTypes/Basic2.java
new file mode 100644
index 000000000..b0c4244e8
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Basic2.java
@@ -0,0 +1,9 @@
+class Basic2 {
+ class Inner {
+ }
+}
+
+aspect Targeter {
+ class Basic2.Inner.InnerInner {
+ }
+}
diff --git a/tests/features169/itdInnerTypes/Choice.java b/tests/features169/itdInnerTypes/Choice.java
new file mode 100644
index 000000000..f944e4fda
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Choice.java
@@ -0,0 +1,28 @@
+import java.util.*;
+
+public class Choice {
+ public static void main(String []argv) {
+ System.out.println(Keys.CHOICE);
+ }
+}
+
+aspect X {
+ static List<Choice> choices;
+ public static List forClass() {
+ ArrayList al = new ArrayList();
+ return al;
+ }
+ public static class Choice.Keys {
+ public static final Function<Object, Choice> CHOICE = Get.attrOf(choices,"choice");
+ }
+}
+
+class Get {
+ public static <T> Function<Object,T> attrOf(List<T> t,String s) {
+ return null;
+ }
+}
+
+class Function<A,B> {
+
+}
diff --git a/tests/features169/itdInnerTypes/FieldAccess.java b/tests/features169/itdInnerTypes/FieldAccess.java
new file mode 100644
index 000000000..6fba671eb
--- /dev/null
+++ b/tests/features169/itdInnerTypes/FieldAccess.java
@@ -0,0 +1,15 @@
+public class FieldAccess {
+ // static String abc = "hello world";
+ public static void main(String []argv) {
+ System.out.println(Inner.number);
+ }
+}
+
+aspect X {
+ public static class FieldAccess.Inner {
+ static int number = 42;
+ public void m() {
+// System.out.println(abc);
+ }
+ }
+}
diff --git a/tests/features169/itdInnerTypes/MethodCall.java b/tests/features169/itdInnerTypes/MethodCall.java
new file mode 100644
index 000000000..ce8649ecd
--- /dev/null
+++ b/tests/features169/itdInnerTypes/MethodCall.java
@@ -0,0 +1,15 @@
+public class MethodCall {
+ // static String abc = "hello world";
+ public static void main(String []argv) {
+ System.out.println(Inner.m());
+ }
+}
+
+aspect X {
+ public static class MethodCall.Inner {
+ static int number = 42;
+ public static Integer m() {
+ return number;
+ }
+ }
+}
diff --git a/tests/features169/itdInnerTypes/OnAnnotation.java b/tests/features169/itdInnerTypes/OnAnnotation.java
new file mode 100644
index 000000000..8aaa6f11f
--- /dev/null
+++ b/tests/features169/itdInnerTypes/OnAnnotation.java
@@ -0,0 +1,11 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+}
+
+aspect X {
+ class Anno.Inner {
+ Inner() {}
+ }
+}
diff --git a/tests/features169/itdInnerTypes/OnEnum.java b/tests/features169/itdInnerTypes/OnEnum.java
new file mode 100644
index 000000000..02d92dc98
--- /dev/null
+++ b/tests/features169/itdInnerTypes/OnEnum.java
@@ -0,0 +1,9 @@
+enum EEE {
+ Red,Green,Blue;
+}
+
+aspect X {
+ class EEE.Inner {
+ Inner() {}
+ }
+}
diff --git a/tests/features169/itdInnerTypes/OnInterface.java b/tests/features169/itdInnerTypes/OnInterface.java
new file mode 100644
index 000000000..f2c381d5d
--- /dev/null
+++ b/tests/features169/itdInnerTypes/OnInterface.java
@@ -0,0 +1,8 @@
+interface OnInterface {
+}
+
+aspect X {
+ static class OnInterface.Inner {
+ Inner() {}
+ }
+}
diff --git a/tests/features169/itdInnerTypes/OnlyStatic.java b/tests/features169/itdInnerTypes/OnlyStatic.java
new file mode 100644
index 000000000..cbab60919
--- /dev/null
+++ b/tests/features169/itdInnerTypes/OnlyStatic.java
@@ -0,0 +1,8 @@
+class OnlyStatic {
+}
+
+aspect X {
+ class OnlyStatic.Inner {
+ Inner() {}
+ }
+}
diff --git a/tests/features169/itdInnerTypes/Simplest.java b/tests/features169/itdInnerTypes/Simplest.java
new file mode 100644
index 000000000..873eb69ae
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Simplest.java
@@ -0,0 +1,4 @@
+aspect Targeter {
+ intertype Basic {}
+ //static aspect C {}
+}
diff --git a/tests/features169/itdInnerTypes/Simplest2.java b/tests/features169/itdInnerTypes/Simplest2.java
new file mode 100644
index 000000000..d3649dfb8
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Simplest2.java
@@ -0,0 +1,7 @@
+aspect Targeter {
+ intertype Basic {
+ static class Foo {
+ }
+ }
+ //static aspect C {}
+}
diff --git a/tests/features169/itdInnerTypes/Simplest3.java b/tests/features169/itdInnerTypes/Simplest3.java
new file mode 100644
index 000000000..4a1c2b5c6
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Simplest3.java
@@ -0,0 +1,12 @@
+aspect Targeter {
+ intertype Basic {
+ public void foo() {} // declared on Basic
+ }
+ //static aspect C {}
+}
+
+class Basic {
+ public static void main(String[] argv) {
+ new Basic().foo();
+ }
+}
diff --git a/tests/features169/itdInnerTypes/Simplest4.java b/tests/features169/itdInnerTypes/Simplest4.java
new file mode 100644
index 000000000..8798e1f1d
--- /dev/null
+++ b/tests/features169/itdInnerTypes/Simplest4.java
@@ -0,0 +1,15 @@
+public class Simplest4 {
+ // static String abc = "hello world";
+ public static void main(String []argv) {
+ System.out.println(Inner.number);
+ }
+}
+
+aspect X {
+ public static class Simplest4.Inner {
+ static int number = 42;
+ public void m() {
+// System.out.println(abc);
+ }
+ }
+}