View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule462horizontalwhitespace;
2   
3   import java.util.Collection;
4   import java.util.Map;
5   
6   // we need these interfaces for generics
7   // violation below 'Top-level class Foo3 has to reside in its own source file.'
8   interface Foo3 {}
9   
10  // violation below 'Top-level class Foo22 has to reside in its own source file.'
11  interface Foo22 {}
12  
13  /** some javadoc. */
14  public class InputFormattedWhitespaceAroundGenerics {}
15  
16  // No whitespace after commas
17  // violation below 'Top-level class BadCommas2 has to reside in its own source file.'
18  class BadCommas2<A, B, C extends Map<A, String>> {
19    private final java.util.Hashtable<Integer, Foo> test = new java.util.Hashtable<Integer, Foo>();
20  }
21  
22  // violation below 'Top-level class Wildcard2 has to reside in its own source file.'
23  class Wildcard2 {
24    public static void foo(Collection<? extends Wildcard[]> collection) {
25      // A statement is important in this method to flush out any
26      // issues with parsing the wildcard in the signature
27      collection.size();
28    }
29  
30    public static void foo2(Collection<? extends Wildcard[]> collection) {
31      // A statement is important in this method to flush out any
32      // issues with parsing the wildcard in the signature
33      collection.size();
34    }
35  }