View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.annotation.annotationonsameline;
2   
3   import java.util.List;
4   
5   @Ann
6   @Ann2 interface TestInterface {
7   
8       @Ann
9       @Ann2 Integer getX();
10  
11  }
12  
13  public @Ann
14  @Ann2 class InputAnnotationOnSameLineCheckOnDifferentTokens implements @Ann
15          @Ann2 TestInterface {
16  
17      @Ann
18      @Ann2 private Integer x = new @Ann
19              @Ann2 Integer(0);
20  
21      private List<@Ann
22              @Ann2 Integer> integerList;
23  
24      @Ann
25      @Ann2 enum TestEnum {
26          A1, A2
27      }
28  
29      @Ann
30      @Ann2 public InputAnnotationOnSameLineCheckOnDifferentTokens() {
31      }
32  
33      @Ann
34      @Ann2 public void setX(@Ann
35              @Ann2 int x) throws @Ann
36                      @Ann2 Exception {
37          this.<@Ann
38                  @Ann2 Integer> getXAs();
39          this.x = x;
40      }
41  
42      @Override public Integer getX() {
43          return (@Ann
44                  @Ann2 Integer) x;
45      }
46      
47      public <T> T getXAs() {
48          return (T) x;
49      }
50  
51  }
52  
53  @Ann
54  @Ann2 @interface TestAnnotation {
55  
56      @Ann
57      @Ann2 int x();
58      
59  }