View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.annotation.annotationonsameline;
2   
3   import static java.lang.annotation.ElementType.*;
4   
5   import java.lang.annotation.Target;
6   import java.util.List;
7   import java.util.ArrayList;
8   
9   public class InputAnnotationOnSameLineCheck2 {
10  
11      @Ann
12      private List<String> names = new ArrayList<>();
13  
14      @Ann private List<String> names2 = new ArrayList<>();
15  
16      @SuppressWarnings("deprecation")
17      @Ann Integer x;
18  
19      @SuppressWarnings("deprecation")
20      @Ann
21      Integer x2;
22  
23      @SuppressWarnings("deprecation") @Ann @Ann2 @Ann3 @Ann4 Integer x3;
24  
25  }
26  
27  @Target({ANNOTATION_TYPE, CONSTRUCTOR, FIELD, METHOD, PARAMETER, TYPE, TYPE_PARAMETER, TYPE_USE}) @interface Ann {
28  }
29  
30  @Target({ANNOTATION_TYPE, CONSTRUCTOR, FIELD, METHOD, PARAMETER, TYPE, TYPE_PARAMETER, TYPE_USE}) @interface Ann2 {
31  }
32  
33  @interface Ann3 {
34  }
35  
36  @interface Ann4 {
37  }