Initial push.
diff --git a/src/test/examplesAndroidO/repeat_annotations/NumberAnnotation.java b/src/test/examplesAndroidO/repeat_annotations/NumberAnnotation.java
new file mode 100644
index 0000000..7e304b9
--- /dev/null
+++ b/src/test/examplesAndroidO/repeat_annotations/NumberAnnotation.java
@@ -0,0 +1,14 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package repeat_annotations;
+
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(NumberAnnotations.class)
+public @interface NumberAnnotation {
+ int number() default 32;
+}
diff --git a/src/test/examplesAndroidO/repeat_annotations/NumberAnnotations.java b/src/test/examplesAndroidO/repeat_annotations/NumberAnnotations.java
new file mode 100644
index 0000000..a70587a
--- /dev/null
+++ b/src/test/examplesAndroidO/repeat_annotations/NumberAnnotations.java
@@ -0,0 +1,12 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package repeat_annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface NumberAnnotations {
+ NumberAnnotation[] value();
+}
diff --git a/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotations.java b/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotations.java
new file mode 100644
index 0000000..d55de94
--- /dev/null
+++ b/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotations.java
@@ -0,0 +1,22 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package repeat_annotations;
+
+// Simple test of Java 8 repeated annotations.
+public class RepeatAnnotations {
+
+ @NumberAnnotation(number = 1)
+ @NumberAnnotation(number = 2)
+ @NumberAnnotation(number = 3)
+ class Inner {
+ }
+
+ public static void main(String[] args) {
+ NumberAnnotations annotations = Inner.class.getAnnotation(NumberAnnotations.class);
+ System.out.println(annotations.value().length);
+ for (NumberAnnotation annotation : annotations.value()) {
+ System.out.println("Number annotation value: " + annotation.number());
+ }
+ }
+}
diff --git a/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotationsNewApi.java b/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotationsNewApi.java
new file mode 100644
index 0000000..6d23706
--- /dev/null
+++ b/src/test/examplesAndroidO/repeat_annotations/RepeatAnnotationsNewApi.java
@@ -0,0 +1,23 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package repeat_annotations;
+
+// Simple test of Java 8 repeated annotations using the new getAnnotationsByType
+// API to access them.
+public class RepeatAnnotationsNewApi {
+
+ @NumberAnnotation(number = 1)
+ @NumberAnnotation(number = 2)
+ @NumberAnnotation(number = 3)
+ class Inner {
+ }
+
+ public static void main(String[] args) {
+ NumberAnnotation[] annotations = Inner.class.getAnnotationsByType(NumberAnnotation.class);
+ System.out.println(annotations.length);
+ for (NumberAnnotation annotation : annotations) {
+ System.out.println("Number annotation value: " + annotation.number());
+ }
+ }
+}