View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.annotation.annotationlocation;
2   
3   
4   
5   
6   @MyAnnotation6
7   @MyAnnotation5
8   class InputAnnotationLocationCorrect
9   {
10      
11      @MyAnnotation6
12      @MyAnnotation5
13      public int a;
14  
15      @MyAnnotation5
16      public int b;
17      
18      @MyAnnotation6
19      @MyAnnotation5
20      public int c;
21      
22      @MyAnnotation5
23      public int d;
24      
25      @MyAnnotation6
26      @MyAnnotation5
27      public InputAnnotationLocationCorrect()
28      {
29          //comment
30      }
31      @MyAnnotation5
32      @MyAnnotation6
33      void foo1() {}
34      
35      @MyAnnotation5
36      @MyAnnotation6
37      void foo2() {}
38      
39      @MyAnnotation5
40      @MyAnnotation6
41      @MyAnnotation3
42      @MyAnnotation4
43      class InnerClass
44      {
45          @MyAnnotation6
46          @MyAnnotation5
47          public int a;
48  
49          @MyAnnotation5
50          public int b;
51          
52          @MyAnnotation6
53          @MyAnnotation5
54          public int c;
55          
56          @MyAnnotation5
57          public int d;
58          
59          @MyAnnotation6
60          public InnerClass()
61          {
62              // comment
63          }
64          @MyAnnotation5
65          @MyAnnotation6 void foo1(int a) {}
66          
67          @MyAnnotation5
68          @MyAnnotation6
69          void foo2() {}
70      }
71  
72      @MyAnnotation5
73      @MyAnnotation6
74      InnerClass anon = new InnerClass()
75      {
76          @MyAnnotation6
77          @MyAnnotation5
78          public int a;
79  
80          @MyAnnotation5 public int b;
81          
82          @MyAnnotation6
83          @MyAnnotation5
84          public int c;
85          
86          @MyAnnotation5
87          public int d;
88          
89          @MyAnnotation5
90          @MyAnnotation6 void foo1() {}
91          
92          @MyAnnotation5
93          @MyAnnotation6
94          void foo2() {}
95      };
96      
97  }
98  
99  @MyAnnotation5
100 @MyAnnotation6
101 class _Foo {}
102 
103 @interface MyAnnotation5 {}
104 
105 @interface MyAnnotation6 {}