aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after/TypeAnnotations.java
blob: aa93f173744f10b65a1fd3b8e809200de69bb03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 {
	}
	@Target(ElementType.TYPE_USE)
	@interface Baz {
	}
	@Target(ElementType.TYPE_USE)
	@interface Bat {
	}
	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;
	}
	public void test3(String[][] arg, String[]... arg2) {
		@Baz
		String @Bar [] @Foo [] x;
	}
	public void test4(@Foo String @Bar [] @Baz [] @Bat ... y) {
	}
}