1
2
3
4
5
6
7 package com.puppycrawl.tools.checkstyle.checks.whitespace.genericwhitespace;
8
9 import java.lang.annotation.Target;
10 import java.util.ArrayList;
11 import java.util.List;
12
13 import static java.lang.annotation.ElementType.TYPE_USE;
14
15 public class InputGenericWhitespaceBeforeCtorInvocation {
16 List<String> music = new ArrayList<>();
17 List todo = new ArrayList<> ();
18
19 Gen<String, Integer> eel = new Gen<String, Integer > ();
20
21
22
23
24 Pipe pipe = new Pipe< String>() {
25 };
26
27 Class<?>[] classy = new Class<?> []{};
28
29 void method() {
30 new Very.Deep<Integer>();
31 new Very.Deep.Rabbit.Hole < Integer > ();
32
33
34
35
36
37
38 new @A Gen<@A Gen, @A Gen> ();
39 new java.util.HashMap<Integer, Integer> ();
40 new ArrayList<Very <Gen<String,String>>> ();
41
42
43
44 }
45
46 static final Very<Gen<String, String>> veryGen =
47 new Very<Gen<String, String>> () {};
48
49 <T> void mustPatTheCroc(boolean mustPat, T[] crocs) {
50 Very.swampPuppy(new Gen<String, String> ());
51 if (!mustPat) {
52 mustPatTheCroc(true, new Very<?> []{});
53 }
54 }
55
56 class Gen<T, U> {}
57
58 static class Very<Q> {
59 static void swampPuppy(Gen<String, String> croc) {}
60 static class Deep<D> {
61 static class Rabbit<R> {
62 static class Hole<H> {
63
64 }
65 }
66 }
67 }
68
69 interface Pipe<T> {
70 }
71
72 @Target({TYPE_USE}) @interface A {}
73 }