View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule4854fieldannotations;
2   
3   /** Some javadoc. */
4   public class InputFormattedFieldAnnotations {
5     /** Some javadoc. */
6     public @interface SomeAnnotation1 {}
7   
8     /** Some javadoc. */
9     public @interface SomeAnnotation2 {}
10  
11    /** Some javadoc. */
12    public @interface SomeAnnotation3 {
13      /** Some javadoc. */
14      int x();
15    }
16  
17    /** testing. */
18    @SomeAnnotation1 @SomeAnnotation2 String name = "Zops";
19  
20    /** testing. */
21    @SomeAnnotation1 @SomeAnnotation2 int age = 19;
22  
23    /** testing. */
24    @SomeAnnotation1 @SomeAnnotation2 String favLanguage = "Java";
25  
26    /** testing. */
27    @SomeAnnotation1
28    @SomeAnnotation3(x = 90)
29    String favPet = "Dog";
30  
31    @SomeAnnotation1 @SomeAnnotation2 boolean test = false;
32  
33    @SuppressWarnings("bla")
34    @SomeAnnotation3(x = 0)
35    float pi = 3.14f;
36  
37    /** testing. */
38    @SomeAnnotation1
39    @SomeAnnotation2
40    void test1() {}
41  
42    @SomeAnnotation1
43    @SomeAnnotation2
44    void test2() {}
45  
46    @SomeAnnotation3(x = 78)
47    void test3() {}
48  }