View Javadoc
1   /*
2   WhitespaceAfter
3   tokens = (default)COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, LITERAL_WHILE, \
4            LITERAL_DO, LITERAL_FOR, DO_WHILE
5   
6   
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.whitespace.whitespaceafter;
10  
11  import java.util.Collection;
12  import java.util.Map;
13  
14  public class InputWhitespaceAfterGenerics<A, B extends Collection<?>,
15         C extends D&E, F extends Collection<? extends InputWhitespaceAfterGenerics[]>>
16  {
17  }
18  
19  //No whitespace after commas
20  class BadCommas < A,B,C extends Map < A,String > > // 3 violations
21  {
22      private java.util.Hashtable < Integer, D > p =
23          new java.util.Hashtable < Integer, D > ();
24  }
25  
26  class Wildcard
27  {
28      public static void foo(Collection < ? extends Wildcard[] > collection) {
29          // A statement is important in this method to flush out any
30          // issues with parsing the wildcard in the signature
31          collection.size();
32      }
33  }
34  
35  // we need these interfaces for generics
36  interface D {
37  }
38  interface E {
39  }