View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="JavadocLeadingAsteriskAlign">
5         <property name="tabWidth" value="2"/>
6       </module>
7     </module>
8   </module>
9   */
10  
11  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocleadingasteriskalign;
12  
13  /** Title
14   * Javadoc for class
15   */
16  public class InputJavadocLeadingAsteriskAlignCorrect {
17  
18    /** javadoc for instance variable. */
19    private int a;
20  
21    /** */
22    private int b;
23  
24    /***/
25    private String str;
26  
27    /** */
28    private String str1;
29  
30    /**
31      This javadoc is allowed because there is no leading asterisk.
32     */
33    public InputJavadocLeadingAsteriskAlignCorrect() {}
34  
35    /***
36     * @param a testing....
37     */
38    public InputJavadocLeadingAsteriskAlignCorrect(int a) {}
39  
40    /*************************************************
41     *** @param str testing.....
42     **********************************/
43    public InputJavadocLeadingAsteriskAlignCorrect(String str) {}
44  
45    /** * */
46    private String str2;
47  
48    /****/
49    private String str3;
50  
51    /**
52     * This method does nothing.
53     */
54    private void foo() {}
55  
56    /**
57     * Javadoc for foo2
58   This is allowed */
59    private void foo2() {
60      // foo2 code goes here
61    } /**
62       * This is also allowed
63       */
64    public void foo3() {}
65  
66    /**
67     * Javadoc for enum
68     * */
69    private enum correctJavadocEnum {
70      /**
71  
72       */
73      ONE,
74  
75      /**
76  Testing
77       */
78      TWO,
79  
80      /** This is allowed
81  
82       */
83      THREE,
84  
85      /**
86       * Allowed. */
87      FOUR,
88  
89      /**
90  
91       */
92      FIVE
93    }
94  }