]> source.dussan.org Git - aspectj.git/commitdiff
itd inners: testcode
authoraclement <aclement>
Fri, 11 Jun 2010 16:35:25 +0000 (16:35 +0000)
committeraclement <aclement>
Fri, 11 Jun 2010 16:35:25 +0000 (16:35 +0000)
40 files changed:
tests/features169/itdInnerTypes/Construction.java [new file with mode: 0644]
tests/features169/itdInnerTypes/Construction3.java [new file with mode: 0644]
tests/features169/itdInnerTypes/Construction4.java [new file with mode: 0644]
tests/features169/itdInnerTypes/eight/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/eight/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/eight/Underscorer.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/eight/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/five/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/five/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/five/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/five/Vote_Amender.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/four/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/four/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/four/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/four/Vote_Amender.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/nine/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/nine/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/nine/Underscorer.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/nine/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/one/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/one/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/one/Vote_Amender.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/seven/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/seven/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/seven/Underscorer.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/seven/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/six/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/six/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/six/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/six/Vote_Amender.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/ten/Aspect1.java [new file with mode: 0644]
tests/features169/itdInnerTypes/ten/Aspect2.java [new file with mode: 0644]
tests/features169/itdInnerTypes/ten/Construction.java [new file with mode: 0644]
tests/features169/itdInnerTypes/three/RelatedType.java [new file with mode: 0644]
tests/features169/itdInnerTypes/three/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/three/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/three/Vote_Amender.aj [new file with mode: 0644]
tests/features169/itdInnerTypes/two/Runner.java [new file with mode: 0644]
tests/features169/itdInnerTypes/two/Vote.java [new file with mode: 0644]
tests/features169/itdInnerTypes/two/Vote_Amender.aj [new file with mode: 0644]

diff --git a/tests/features169/itdInnerTypes/Construction.java b/tests/features169/itdInnerTypes/Construction.java
new file mode 100644 (file)
index 0000000..40f965b
--- /dev/null
@@ -0,0 +1,11 @@
+public class Construction {
+  public static void main(String []argv) {
+    new _();
+    System.out.println("done");
+  }
+}
+
+aspect XX {
+  public static class Construction._ {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/Construction3.java b/tests/features169/itdInnerTypes/Construction3.java
new file mode 100644 (file)
index 0000000..b4f1973
--- /dev/null
@@ -0,0 +1,18 @@
+aspect Aspect2 {
+  public static class Construction3._ {
+    String string;
+    public _(String string) { this.string = string;}
+    public String toString() {
+      return string;
+    }
+  }
+  public static Construction3._ Construction3._() { return new _("abc"); }
+  public static String Construction3.foo() { return "abc"; }
+}
+public class Construction3 {
+  public static void main(String []argv) {
+    Object o = _();
+    o = foo();
+    System.out.println(o);
+  }
+}
diff --git a/tests/features169/itdInnerTypes/Construction4.java b/tests/features169/itdInnerTypes/Construction4.java
new file mode 100644 (file)
index 0000000..5c97371
--- /dev/null
@@ -0,0 +1,20 @@
+aspect Aspect1 {
+  public static Construction4._ Construction4._() { return new _("abc"); }
+  public static String Construction4.foo() { return "abc"; }
+}
+aspect Aspect2 {
+  public static class Construction4._ {
+    String string;
+    public _(String string) { this.string = string;}
+    public String toString() {
+      return string;
+    }
+  }
+} 
+public class Construction4 {
+  public static void main(String []argv) {
+    Object o = _();
+    o = foo();
+    System.out.println(o);
+  }
+}
diff --git a/tests/features169/itdInnerTypes/eight/RelatedType.java b/tests/features169/itdInnerTypes/eight/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/eight/Runner.java b/tests/features169/itdInnerTypes/eight/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/eight/Underscorer.aj b/tests/features169/itdInnerTypes/eight/Underscorer.aj
new file mode 100644 (file)
index 0000000..93ca709
--- /dev/null
@@ -0,0 +1,17 @@
+package a.b.c;
+
+public aspect Underscorer {
+  public int Vote.i = 5;
+  public String Vote.zzz() { return "abc"; }
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public Ip ip = new Ip();
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+    public class Ip {
+      public String fieldName() { return "ip"; }
+      public Class<Vote> type() { return Vote.class; }
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/eight/Vote.java b/tests/features169/itdInnerTypes/eight/Vote.java
new file mode 100644 (file)
index 0000000..8d22bdc
--- /dev/null
@@ -0,0 +1,9 @@
+package a.b.c;
+
+public class Vote {
+
+  public static Vote._ _() { return new Vote._(null); }
+
+  static class RealInner {}
+
+}
diff --git a/tests/features169/itdInnerTypes/five/RelatedType.java b/tests/features169/itdInnerTypes/five/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/five/Runner.java b/tests/features169/itdInnerTypes/five/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/five/Vote.java b/tests/features169/itdInnerTypes/five/Vote.java
new file mode 100644 (file)
index 0000000..fc3c8bc
--- /dev/null
@@ -0,0 +1,6 @@
+package a.b.c;
+
+public class Vote {
+  static class RealInner {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/five/Vote_Amender.aj b/tests/features169/itdInnerTypes/five/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..ec80d28
--- /dev/null
@@ -0,0 +1,15 @@
+package a.b.c;
+
+public aspect Vote_Amender {
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public Ip ip = new Ip();
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+    public class Ip {
+      public String fieldName() { return "ip"; }
+      public Class<Vote> type() { return Vote.class; }
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/four/RelatedType.java b/tests/features169/itdInnerTypes/four/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/four/Runner.java b/tests/features169/itdInnerTypes/four/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/four/Vote.java b/tests/features169/itdInnerTypes/four/Vote.java
new file mode 100644 (file)
index 0000000..fc3c8bc
--- /dev/null
@@ -0,0 +1,6 @@
+package a.b.c;
+
+public class Vote {
+  static class RealInner {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/four/Vote_Amender.aj b/tests/features169/itdInnerTypes/four/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..44a4ff7
--- /dev/null
@@ -0,0 +1,10 @@
+package a.b.c;
+
+public aspect Vote_Amender {
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/nine/RelatedType.java b/tests/features169/itdInnerTypes/nine/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/nine/Runner.java b/tests/features169/itdInnerTypes/nine/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/nine/Underscorer.aj b/tests/features169/itdInnerTypes/nine/Underscorer.aj
new file mode 100644 (file)
index 0000000..2d633bf
--- /dev/null
@@ -0,0 +1,17 @@
+package a.b.c;
+
+public aspect Underscorer {
+  public Vote._ Vote._()  { return new Vote._(null); }
+
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public Ip ip = new Ip();
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+    public class Ip {
+      public String fieldName() { return "ip"; }
+      public Class<Vote> type() { return Vote.class; }
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/nine/Vote.java b/tests/features169/itdInnerTypes/nine/Vote.java
new file mode 100644 (file)
index 0000000..956c7e1
--- /dev/null
@@ -0,0 +1,9 @@
+package a.b.c;
+
+public class Vote {
+
+//  public static Vote._ _() { return new Vote._(null); }
+
+  static class RealInner {}
+
+}
diff --git a/tests/features169/itdInnerTypes/one/Runner.java b/tests/features169/itdInnerTypes/one/Runner.java
new file mode 100644 (file)
index 0000000..b0f9cef
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+
+public class Runner {
+  public static void main(String[]argv) {
+    new Vote();
+  }
+}
diff --git a/tests/features169/itdInnerTypes/one/Vote.java b/tests/features169/itdInnerTypes/one/Vote.java
new file mode 100644 (file)
index 0000000..5ec9cca
--- /dev/null
@@ -0,0 +1,4 @@
+package a.b.c;
+
+public class Vote {
+}
diff --git a/tests/features169/itdInnerTypes/one/Vote_Amender.aj b/tests/features169/itdInnerTypes/one/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..4c8c7ee
--- /dev/null
@@ -0,0 +1,6 @@
+package a.b.c;
+
+aspect Vote_Amender {
+  static class Vote._ {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/seven/RelatedType.java b/tests/features169/itdInnerTypes/seven/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/seven/Runner.java b/tests/features169/itdInnerTypes/seven/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/seven/Underscorer.aj b/tests/features169/itdInnerTypes/seven/Underscorer.aj
new file mode 100644 (file)
index 0000000..7834247
--- /dev/null
@@ -0,0 +1,15 @@
+package a.b.c;
+
+public aspect Underscorer {
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public Ip ip = new Ip();
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+    public class Ip {
+      public String fieldName() { return "ip"; }
+      public Class<Vote> type() { return Vote.class; }
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/seven/Vote.java b/tests/features169/itdInnerTypes/seven/Vote.java
new file mode 100644 (file)
index 0000000..8d22bdc
--- /dev/null
@@ -0,0 +1,9 @@
+package a.b.c;
+
+public class Vote {
+
+  public static Vote._ _() { return new Vote._(null); }
+
+  static class RealInner {}
+
+}
diff --git a/tests/features169/itdInnerTypes/six/RelatedType.java b/tests/features169/itdInnerTypes/six/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/six/Runner.java b/tests/features169/itdInnerTypes/six/Runner.java
new file mode 100644 (file)
index 0000000..f9bd754
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.choice.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/six/Vote.java b/tests/features169/itdInnerTypes/six/Vote.java
new file mode 100644 (file)
index 0000000..f0f94b2
--- /dev/null
@@ -0,0 +1,9 @@
+package a.b.c;
+
+public class Vote {
+
+  public static Vote._ field = new Vote._(null);
+
+  static class RealInner {}
+
+}
diff --git a/tests/features169/itdInnerTypes/six/Vote_Amender.aj b/tests/features169/itdInnerTypes/six/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..ec80d28
--- /dev/null
@@ -0,0 +1,15 @@
+package a.b.c;
+
+public aspect Vote_Amender {
+  public static class Vote._ {
+    private String string;
+    public static class choice {}
+    public Ip ip = new Ip();
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+    public class Ip {
+      public String fieldName() { return "ip"; }
+      public Class<Vote> type() { return Vote.class; }
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/ten/Aspect1.java b/tests/features169/itdInnerTypes/ten/Aspect1.java
new file mode 100644 (file)
index 0000000..5d95096
--- /dev/null
@@ -0,0 +1,10 @@
+aspect Aspect1 {
+  public static class Construction._ {
+    private String string;
+    public _(String string) { this.string = string; }
+    public _() { this.string = "nothing"; }
+    public String toString() {
+      return string; 
+    }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/ten/Aspect2.java b/tests/features169/itdInnerTypes/ten/Aspect2.java
new file mode 100644 (file)
index 0000000..0048ddf
--- /dev/null
@@ -0,0 +1,3 @@
+aspect Aspect2 {
+  public Construction._ Construction._() { return new _("abc"); }
+}
diff --git a/tests/features169/itdInnerTypes/ten/Construction.java b/tests/features169/itdInnerTypes/ten/Construction.java
new file mode 100644 (file)
index 0000000..43b32a4
--- /dev/null
@@ -0,0 +1,6 @@
+public class Construction {
+  public static void main(String []argv) {
+    new _();
+    System.out.println(new _("abcde"));
+  }
+}
diff --git a/tests/features169/itdInnerTypes/three/RelatedType.java b/tests/features169/itdInnerTypes/three/RelatedType.java
new file mode 100644 (file)
index 0000000..a9c8287
--- /dev/null
@@ -0,0 +1,7 @@
+package a.b.c;
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RelatedType {
+       Class<?> value();
+}
diff --git a/tests/features169/itdInnerTypes/three/Runner.java b/tests/features169/itdInnerTypes/three/Runner.java
new file mode 100644 (file)
index 0000000..cc36878
--- /dev/null
@@ -0,0 +1,11 @@
+package a.b.c;
+
+@RelatedType(value=Vote._.class)
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+    System.out.println(Runner.class.getDeclaredAnnotations()[0]);
+  }
+}
+
diff --git a/tests/features169/itdInnerTypes/three/Vote.java b/tests/features169/itdInnerTypes/three/Vote.java
new file mode 100644 (file)
index 0000000..fc3c8bc
--- /dev/null
@@ -0,0 +1,6 @@
+package a.b.c;
+
+public class Vote {
+  static class RealInner {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/three/Vote_Amender.aj b/tests/features169/itdInnerTypes/three/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..457ec50
--- /dev/null
@@ -0,0 +1,10 @@
+package a.b.c;
+
+public aspect Vote_Amender {
+  public static class Vote._ {
+    private String string;
+    private String choice = "abc";
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+  }
+}
diff --git a/tests/features169/itdInnerTypes/two/Runner.java b/tests/features169/itdInnerTypes/two/Runner.java
new file mode 100644 (file)
index 0000000..eb5987a
--- /dev/null
@@ -0,0 +1,8 @@
+package a.b.c;
+
+public class Runner {
+  public static void main(String[]argv) {
+    Vote._ v = new Vote._("wibble");
+    System.out.println(v.getString());
+  }
+}
diff --git a/tests/features169/itdInnerTypes/two/Vote.java b/tests/features169/itdInnerTypes/two/Vote.java
new file mode 100644 (file)
index 0000000..5ec9cca
--- /dev/null
@@ -0,0 +1,4 @@
+package a.b.c;
+
+public class Vote {
+}
diff --git a/tests/features169/itdInnerTypes/two/Vote_Amender.aj b/tests/features169/itdInnerTypes/two/Vote_Amender.aj
new file mode 100644 (file)
index 0000000..1c5a950
--- /dev/null
@@ -0,0 +1,9 @@
+package a.b.c;
+
+public aspect Vote_Amender {
+  public static class Vote._ {
+    private String string;
+    public _(String string) { this.string = string; }
+    public String getString() { return this.string; }
+  }
+}