aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/pretty/resource')
-rw-r--r--test/pretty/resource/after/TypeAnnotations.java22
-rw-r--r--test/pretty/resource/before/TypeAnnotations.java23
2 files changed, 45 insertions, 0 deletions
diff --git a/test/pretty/resource/after/TypeAnnotations.java b/test/pretty/resource/after/TypeAnnotations.java
new file mode 100644
index 00000000..760b5ef8
--- /dev/null
+++ b/test/pretty/resource/after/TypeAnnotations.java
@@ -0,0 +1,22 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+import java.util.Map;
+public class TypeAnnotations {
+ @Target({ElementType.TYPE_USE, ElementType.LOCAL_VARIABLE})
+ @interface Foo {
+ }
+ @Target(ElementType.TYPE_USE)
+ @interface Bar {
+ }
+ public List<@Foo String> test(@Foo String param) {
+ @Bar
+ String local = "bar";
+ @Foo
+ java.io.@Foo File[] array = {};
+ return new java.util.@Foo ArrayList<java.lang.@Foo String>();
+ }
+ public <@Foo T extends java.lang.@Foo Number> T test2(@Bar String... varargs) {
+ return null;
+ }
+}
diff --git a/test/pretty/resource/before/TypeAnnotations.java b/test/pretty/resource/before/TypeAnnotations.java
new file mode 100644
index 00000000..a39337da
--- /dev/null
+++ b/test/pretty/resource/before/TypeAnnotations.java
@@ -0,0 +1,23 @@
+// version 8:
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+import java.util.Map;
+
+public class TypeAnnotations {
+ @Target({ElementType.TYPE_USE, ElementType.LOCAL_VARIABLE})
+ @interface Foo {}
+
+ @Target(ElementType.TYPE_USE)
+ @interface Bar {}
+
+ public List<@Foo String> test(@Foo String param) {
+ @Bar String local = "bar";
+ @Foo java.io.@Foo File[] array = {};
+ return new java.util.@Foo ArrayList<java.lang.@Foo String>();
+ }
+
+ public <@Foo T extends java.lang.@Foo Number> T test2(@Bar String... varargs) {
+ return null;
+ }
+}