1 package com.puppycrawl.tools.checkstyle.grammar.antlr4;
2
3 import java.util.ArrayList;
4 import java.util.Collections;
5 import java.util.HashMap;
6 import java.util.List;
7 import java.util.Map;
8 import java.util.concurrent.Callable;
9
10 public class InputAntlr4AstRegressionWeirdCtor {
11 void meth()
12 {
13 List<Integer> x = new ArrayList<Integer>();
14 List<List<Integer>> y = new ArrayList<List<Integer>>();
15 List < Integer > a = new ArrayList < Integer > ();
16 List < List < Integer > > b = new ArrayList < List < Integer > > ();
17 }
18
19 public int compareTo(Object aObject)
20 {
21 return 0;
22 }
23
24 public static <T> Callable<T> callable(Runnable task, T result)
25 {
26 return null;
27 }
28
29 public static<T>Callable<T> callable2(Runnable task, T result)
30 {
31 Map<Class<?>, Integer> x = new HashMap<Class<?>, Integer>();
32 for (final Map.Entry<Class<?>, Integer> entry : x.entrySet()) {
33 entry.getValue();
34 }
35 Class<?>[] parameterClasses = new Class<?>[0];
36 return null;
37 }
38 public int getConstructor(Class<?>... parameterTypes)
39 {
40 Collections.<Object>emptySet();
41 Collections. <Object> emptySet();
42 return 666;
43 }
44
45 <T> InputAntlr4AstRegressionWeirdCtor(List<T> things, int i)
46 {
47 }
48
49 public <T> InputAntlr4AstRegressionWeirdCtor(List<T> things)
50 {
51 }
52
53 public interface IntEnum {
54 }
55
56 public static class IntEnumValueType<E extends Enum<E> & IntEnum> {
57 }
58
59 public static class IntEnumValueType2<E extends Enum<E>& IntEnum> {
60 }
61
62 public static class IntEnumValueType3<E extends Enum<E> & IntEnum> {
63 }
64
65 public static class IntEnumValueType4<T extends Comparable<List<T>> & IntEnum> {
66 }
67
68 public void beforeAndAfter() {
69 List
70 <
71 Integer> x = new ArrayList<Integer
72 >();
73 List
74 <Integer> y = new ArrayList<Integer
75 >();
76 Map<Class<?>, Integer> a = new HashMap<Class<?>, Integer>();
77 Map<Class<?>, Integer> b = (Map<Class<?>, Integer>) a;
78 }
79 Object ok = new <String>Object();
80 Object notOkStart = new<String>Object();
81 Object notOkEnd = new <String> Object();
82 Object notOkStartAndEnd = new<String> Object();
83 Object okWithPackage = new <String>java.lang.Object();
84 Object ok2 = new <String>Outer.Inner();
85 Object notOkStart2 = new<String>Outer.Inner();
86 Object notOkEnd2 = new <String> Outer.Inner();
87 Object notOkStartAndEnd2 = new<String> Outer.Inner();
88 }
89 interface SupplierFunction<T> extends Map<List<T>, T> {}
90
91 class Outer {
92 static class Inner {}
93 }