View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule462horizontalwhitespace;
2   
3   import java.io.Serializable;
4   import java.util.ArrayList;
5   import java.util.HashMap;
6   import java.util.List;
7   import java.util.Map;
8   import java.util.concurrent.Callable;
9   import java.util.Collections;
10  class InputGenericWhitespace implements Comparable<InputGenericWhitespace>, Serializable
11  {
12      void meth()
13      {
14          List<Integer> x = new ArrayList<Integer>();
15          List<List<Integer>> y = new ArrayList<List<Integer>>();
16          List < Integer > a = new ArrayList < Integer > (); // warn
17          List < List < Integer > > b = new ArrayList < List < Integer > > (); // warn
18      }
19  
20      public int compareTo(InputGenericWhitespace aObject)
21      {
22          return 0;
23      }
24  
25      public static <T> Callable<T> callable(Runnable task, T result)
26      {
27          return null;
28      }
29  
30      public static<T>Callable<T> callable2(Runnable task, T result) // warn
31      {
32          Map<Class<?>, Integer> x = new HashMap<Class<?>, Integer>();
33          for (final Map.Entry<Class<?>, Integer> entry : x.entrySet()) {
34              entry.getValue();
35          }
36          Class<?>[] parameterClasses = new Class<?>[0];
37          return null;
38      }
39      public int getConstructor(Class<?>... parameterTypes)
40      {
41          Collections.<Object>emptySet();
42          Collections. <Object> emptySet(); // warn
43          return 666;
44      }
45  
46      <T> InputGenericWhitespace(List<T> things, int i)
47      {
48      }
49  
50      public <T> InputGenericWhitespace(List<T> things)
51      {
52      }
53  
54      public interface IntEnum {
55      }
56  
57      public static class IntEnumValueType<E extends Enum<E> & IntEnum> {
58      }
59  
60      public static class IntEnumValueType2<E extends Enum<E>& IntEnum> { // warn
61      }
62  
63      public static class IntEnumValueType3<E extends Enum<E>  & IntEnum> { // warn
64      }
65  }