View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule462horizontalwhitespace;
2   
3   import java.util.Collection;
4   import java.util.Map;
5   
6   public class InputWhitespaceAroundGenerics
7   {
8       
9   }
10  
11  //No whitespace after commas
12  class BadCommas < A,B,C extends Map < A,String > > //warn
13  {
14      private java.util.Hashtable < Integer, D > p = //warn
15          new java.util.Hashtable < Integer, D > (); //warn
16  }
17  
18  class Wildcard
19  {
20      public static void foo(Collection < ? extends Wildcard[] > collection) { //warn
21          // A statement is important in this method to flush out any
22          // issues with parsing the wildcard in the signature
23          collection.size();
24      }
25      
26      public static void foo2(Collection<?extends Wildcard[]> collection) {
27          // A statement is important in this method to flush out any
28          // issues with parsing the wildcard in the signature
29          collection.size();
30      }
31  }
32  
33  // we need these interfaces for generics
34  interface D {
35  }
36  interface E {
37  }