View Javadoc
1   /*
2   JavadocStyle
3   scope = (default)private
4   excludeScope = (default)null
5   checkFirstSentence = false
6   endOfSentenceFormat = (default)([.?!][ \t\n\r\f<])|([.?!]$)
7   checkEmptyJavadoc = true
8   checkHtml = false
9   tokens = (default)ANNOTATION_DEF, ANNOTATION_FIELD_DEF, CLASS_DEF, CTOR_DEF, \
10           ENUM_CONSTANT_DEF, ENUM_DEF, INTERFACE_DEF, METHOD_DEF, PACKAGE_DEF, \
11           VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF
12  
13  
14  */
15  
16  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocstyle;
17  
18  public class InputJavadocStyleEmptyJavadoc1 {
19      // This is OK. We don't flag missing javadoc.  That's left for other checks.
20     private String first;
21  
22     /** This Javadoc is missing an ending period */
23     private String second;
24  
25     /**
26      * We don't want {@link com.puppycrawl.tools.checkstyle.checks.JavadocStyleCheck}
27      * tags to stop the scan for the end of sentence.
28      * @see Something
29      */
30     public InputJavadocStyleEmptyJavadoc1() {}
31  
32     /**
33      * This is ok!
34      */
35     private void method1() {}
36  
37     /**
38      * This is ok?
39      */
40     private void method2() {}
41  
42     /**
43      * And This is ok.<br>
44      */
45     private void method3() {}
46  
47     /**
48      * This should fail even.though.there are embedded periods
49      */
50     private void method4() {}
51  
52     /**
53      * Test HTML in Javadoc comment
54      * <dl>
55      * <dt><b>This guy is missing end of bold tag
56      * <dd>The dt and dd don't require end tags.
57      * </dl>
58      * </td>Extra tag shouldn't be here
59      * <style>this tag isn't supported in Javadoc</style>
60      * @param arg1 <code>dummy.
61      */
62     private void method5(int arg1) {}
63  
64     /**
65      * Protected check <b>should fail
66      */
67     protected void method6() {}
68  
69     /**
70      * Package protected check <b>should fail
71      */
72     void method7() {}
73  
74     /**
75      * Public check should fail</code>
76      * should fail <
77      */
78     public void method8() {}
79  
80     /** {@inheritDoc} **/
81     public void method9() {}
82  
83      // Testcases to exercise the Tag parser (bug 843887)
84  
85      /**
86       * Real men don't use XHTML.
87       * <br />
88       * <hr/>
89       * < br/>
90       * <img src="schattenparker.jpg"/></img>
91       */
92      private void method10() {}
93  
94      /**
95       * Tag content can be really mean.
96       * <p>
97       * Sometimes a p tag is closed.
98       * </p>
99       * <p>
100      * Sometimes it's not.
101      *
102      * <span style="font-family:'Times New Roman',Times,serif;font-size:200%">
103      * Attributes can contain spaces and nested quotes.
104      * </span>
105      * <img src="slashesCanOccurWithin/attributes.jpg"/>
106      * <img src="slashesCanOccurWithin/attributes.jpg">
107      * <!-- comments <div> should not be checked. -->
108      */
109     private void method11() {}
110 
111     /**
112      * Tags for two lines.
113      * <a href="some_link"
114      * >Link Text</a>
115      */
116     private void method12() {}
117 }