View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Target;
5   import java.util.ArrayList;
6   import java.util.List;
7   
8   @TestClassAnnotation
9   class InputLeftCurlyAnnotations 
10  {
11      private static final int X = 10;
12      @Override
13      public boolean equals(Object other)
14      {
15          return false;
16      }
17      
18      @Override
19      @SuppressWarnings("unused")
20      public int hashCode() 
21      {
22          int a = 10;
23          return 1;
24      }
25      
26      @Override @SuppressWarnings({"unused", "unchecked", "static-access"}) public String toString()
27      {
28          Integer i = this.X;
29          List<String> l = new ArrayList();
30          return "SomeString";
31      }
32  }
33  
34  @TestClassAnnotation
35  class InputLeftCurlyAnnotations2 {
36      private static final int X = 10;
37      @Override
38      public boolean equals(Object other) {
39          return false;
40      }
41      
42      @Override
43      @SuppressWarnings("unused")
44      public int hashCode() {
45          int a = 10;
46          return 1;
47      }
48      
49      @Override @SuppressWarnings({"unused", "unchecked", "static-access"}) public String toString()
50      {
51          Integer i = this.X;
52          List<String> l = new ArrayList();
53          return "SomeString";
54      }
55      
56      @Deprecated 
57      @SuppressWarnings({"unused", "unchecked", "static-access"}) public String toString2()
58      {
59          Integer i = this.X;
60          List<String> l = new ArrayList();
61          return "SomeString";
62      }
63  }
64  
65  @Target(ElementType.TYPE)
66  @interface TestClassAnnotation {
67  }