View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule4852classannotations;
2   
3   /**
4    * Test class for checking the rule 4852.
5    */
6   public class InputClassAnnotations {
7     /**
8      * Custom annotation 1.
9      */
10    public @interface SomeAnnotation1 { }
11    // violation above 'Empty blocks should have no spaces. .* may only be represented as {}'
12  
13    /**
14     * Custom annotation 2.
15     */
16    public @interface SomeAnnotation2 { }
17    // violation above 'Empty blocks should have no spaces. .* may only be represented as {}'
18  
19    /**
20     * Inner class 2.
21     */
22    @SomeAnnotation1
23    @SomeAnnotation2
24    class Inner1 {}
25  
26    @SomeAnnotation1
27    @SomeAnnotation2
28    /** // violation 'Javadoc comment is placed in the wrong location.'
29     * Inner class 2.
30     */
31    class Inner2 {}
32  
33    /**
34     * Inner class 3.
35     */
36    @SomeAnnotation1 @SomeAnnotation2
37    // violation above 'Annotation 'SomeAnnotation2' should be alone on line.'
38    class Inner3 {}
39  
40    @SomeAnnotation1 @SomeAnnotation2
41    // violation above 'Annotation 'SomeAnnotation2' should be alone on line.'
42    /** // violation 'Javadoc comment is placed in the wrong location.'
43     * Inner class 4.
44     */
45    class Inner4 {}
46  }