1<documentation title="Class Comments">
2    <standard>
3    <![CDATA[
4    Classes and interfaces must have a non-empty doc comment.  The short description must be on the second line of the comment.  Each description must have one blank comment line before and after.  There must be one blank line before the tags in the comments.  A @version tag must be in Release: package_version format.
5    ]]>
6    </standard>
7    <code_comparison>
8        <code title="Valid: A doc comment for the class.">
9        <![CDATA[
10<em>/**
11 * The Foo class.
12 */</em>
13class Foo
14{
15}
16        ]]>
17        </code>
18        <code title="Invalid: No doc comment for the class.">
19        <![CDATA[
20class Foo
21{
22}
23        ]]>
24        </code>
25    </code_comparison>
26    <code_comparison>
27        <code title="Valid: A doc comment for the class.">
28        <![CDATA[
29<em>/**
30 * The Foo class.
31 */</em>
32class Foo
33{
34}
35        ]]>
36        </code>
37        <code title="Invalid: Invalid comment type for the class.">
38        <![CDATA[
39// The Foo class.
40class Foo
41{
42}
43        ]]>
44        </code>
45    </code_comparison>
46    <code_comparison>
47        <code title="Valid: A doc comment for the class.">
48        <![CDATA[
49<em>/**
50 * The Foo class.
51 */</em>
52class Foo
53{
54}
55        ]]>
56        </code>
57        <code title="Invalid: The blank line after the comment makes it appear as a file comment, not a class comment.">
58        <![CDATA[
59<em>/**
60 * The Foo class.
61 */</em>
62
63class Foo
64{
65}
66        ]]>
67        </code>
68    </code_comparison>
69    <code_comparison>
70        <code title="Valid: Short description is the second line of the comment.">
71        <![CDATA[
72/**
73 * <em>The Foo class.</em>
74 */
75class Foo
76{
77}
78        ]]>
79        </code>
80        <code title="Invalid: An extra blank line before the short description.">
81        <![CDATA[
82/**
83 *
84 * <em>The Foo class.</em>
85 */
86class Foo
87{
88}
89        ]]>
90        </code>
91    </code_comparison>
92    <code_comparison>
93        <code title="Valid: Exactly one blank line around descriptions.">
94        <![CDATA[
95/**
96 * The Foo class.
97 * <em></em>
98 * A helper for the Bar class.
99 * <em></em>
100 * @see Bar
101 */
102class Foo
103{
104}
105        ]]>
106        </code>
107        <code title="Invalid: Extra blank lines around the descriptions.">
108        <![CDATA[
109/**
110 * The Foo class.
111 * <em></em>
112 * <em></em>
113 * A helper for the Bar class.
114 * <em></em>
115 * <em></em>
116 * @see Bar
117 */
118class Foo
119{
120}
121        ]]>
122        </code>
123    </code_comparison>
124    <code_comparison>
125        <code title="Valid: Exactly one blank line before the tags.">
126        <![CDATA[
127/**
128 * The Foo class.
129 * <em></em>
130 * @see Bar
131 */
132class Foo
133{
134}
135        ]]>
136        </code>
137        <code title="Invalid: Extra blank lines before the tags.">
138        <![CDATA[
139/**
140 * The Foo class.
141 * <em></em>
142 * <em></em>
143 * @see Bar
144 */
145class Foo
146{
147}
148        ]]>
149        </code>
150    </code_comparison>
151    <code_comparison>
152        <code title="Valid: Version tag is in the correct format.">
153        <![CDATA[
154/**
155 * The Foo class.
156 *
157 * @version <em>Release: 1.0</em>
158 */
159class Foo
160{
161}
162        ]]>
163        </code>
164        <code title="Invalid: No Release: text.">
165        <![CDATA[
166/**
167 * The Foo class.
168 *
169 * @version <em>1.0</em>
170 */
171class Foo
172{
173}
174        ]]>
175        </code>
176    </code_comparison>
177</documentation>
178