1   package com.puppycrawl.tools.checkstyle.checks.javadoc.javadoctagcontinuationindentation;
2   
3   import java.io.Serializable;
4   
5   /**
6    * Some javadoc.
7    *
8    * @since Some javadoc.
9    *     Some javadoc.
10   * @version 1.0
11   * @see Some javadoc.
12   *     Some javadoc.
13   * @see Some javadoc.
14   * @author max
15   *     Some javadoc.
16   */
17  class InputJavadocTagContinuationIndentation implements Serializable
18  {
19  	/**
20       * The client's first name.
21       * @serial Some javadoc.
22       *     Some javadoc.
23       */
24      private String fFirstName;
25       
26      /**
27       * The client's first name.
28       * @serial
29       *     Some javadoc.
30       */
31      private String sSecondName;
32        
33      /**
34       * The client's first name.
35       * @serialField
36       *     Some javadoc.
37       */
38      private String tThirdName;
39  	
40      /**
41       * Some text.
42       * @param aString Some javadoc.
43       *     Some javadoc.
44       * @return Some text.
45       * @serialData Some javadoc.
46       * @see Some text.
47       *    Some javadoc. // warn
48       * @throws Exception Some text.
49       */
50      String method(String aString) throws Exception
51      {
52          return "null";
53      }
54  
55      /**
56       * Some text.
57       * @serialData Some javadoc.
58       * @return Some text.
59       *     Some javadoc.
60       * @param aString Some text.
61       * @throws Exception Some text.
62       */
63      String method1(String aString) throws Exception
64      {
65          return "null";
66      }
67  
68      /**
69       * Some text.
70       * @throws Exception Some text.
71       *     Some javadoc.
72       * @param aString Some text.
73       */
74      void method2(String aString) throws Exception {}
75      
76      /**
77       * Some text.
78       * @see Some text.
79       * @throws Exception Some text.
80       *     Some javadoc.
81       */
82      void method3() throws Exception {}
83      
84      /**
85       * Some text.
86       * @return Some text.
87       * @throws Exception Some text.
88       */
89      String method4() throws Exception
90      {
91          return "null";
92      }
93  
94      /**
95       * Some text.
96       * @see Some text.
97       * @return Some text.
98       * @param aString Some text.
99       */
100     String method5(String aString)
101     {
102         return "null";
103     }
104     
105     /**
106      * Some text.
107      * @param aString Some text.
108      * @return Some text.
109      *    Some javadoc. // warn
110      * @serialData Some javadoc.
111      * @param aInt Some text.
112      *    Some javadoc. // warn
113      * @throws Exception Some text.
114      * @param aBoolean Some text.
115      * @see Some text.
116      */
117     String method6(String aString, int aInt, boolean aBoolean) throws Exception
118     {
119         return "null";
120     }
121     
122     /**
123      * Some javadoc.
124      * 
125      * @version 1.0
126      * @since Some javadoc.
127      * @serialData Some javadoc.
128      * @author max
129      */
130     class InnerClassWithAnnotations
131     {
132         /**
133          * Some text.
134          * @return Some text.
135          * @see Some text.
136          *     Some javadoc.
137          * @param aString Some text.
138          * @throws Exception Some text.
139          *     Some javadoc.
140          */
141         String method(String aString) throws Exception
142         {
143             return "null";
144         }
145 
146         /**
147          * Some text.
148          * @throws Exception Some text.
149          *     Some javadoc.
150          * @return Some text.
151          * @param aString Some text.
152          *     Some javadoc.
153          */
154         String method1(String aString) throws Exception
155         {
156             return "null";
157         }
158 
159         /**
160          * Some text.
161          * @serialData Some javadoc.
162          *     Some javadoc.
163          * @param aString Some text.
164          *     Some javadoc.
165          * @throws Exception Some text.
166          */
167         void method2(String aString) throws Exception {}
168         
169         /**
170          * Some text.
171          * @see Some text.
172          * @throws Exception Some text.
173          */
174         void method3() throws Exception {}
175         
176         /**
177          * Some text.
178          * @throws Exception Some text.
179          * @serialData Some javadoc.
180          * @return Some text.
181          */
182         String method4() throws Exception
183         {
184             return "null";
185         }
186 
187         /**
188          * Some text.
189          * @param aString Some text.
190          * @see Some text.
191          * @return Some text.
192          */
193         String method5(String aString)
194         {
195             return "null";
196         }
197         
198         /**
199          * Some text.
200          * @param aString Some text.
201          * @return Some text.
202          * @param aInt Some text.
203          *    Some javadoc. // warn
204          * @throws Exception Some text.
205          * @param aBoolean Some text.
206          *    Some javadoc. // warn
207          * @see Some text.
208          */
209         String method6(String aString, int aInt, boolean aBoolean) throws Exception
210         {
211             return "null";
212         }
213     }
214     
215     InnerClassWithAnnotations anon = new InnerClassWithAnnotations()
216     {
217         /**
218          * Some text.
219          * @throws Exception Some text.
220          * @param aString Some text.
221          *   Some javadoc. // warn
222          * @serialData Some javadoc.
223          *    Some javadoc. // warn
224          * @see Some text.
225          * @return Some text.
226          */
227         String method(String aString) throws Exception
228         {
229             return "null";
230         }
231 
232         /**
233          * Some text.
234          * @param aString Some text.
235          *     Some javadoc.
236          * @throws Exception Some text.
237          * @return Some text.
238          */
239         String method1(String aString) throws Exception
240         {
241             return "null";
242         }
243 
244         /**
245          * Some text.
246          * @throws Exception Some text.
247          *     Some javadoc.
248          * @param aString Some text.
249          */
250         void method2(String aString) throws Exception {}
251         
252         /**
253          * Some text.
254          * @see Some text.
255          *     Some javadoc.
256          * @throws Exception Some text.
257          */
258         void method3() throws Exception {}
259         
260         /**
261          * Some text.
262          * @throws Exception Some text.
263          * @return Some text.
264          */
265         String method4() throws Exception
266         {
267             return "null";
268         }
269 
270         /**
271          * Some text.
272          * @see Some text.
273          * @return Some text.
274          * @param aString Some text.
275          */
276         String method5(String aString)
277         {
278             return "null";
279         }
280         
281         /**
282          * Some text.
283          *       Some javadoc. // warn
284          * @param aString Some text.
285          *    Some javadoc. // warn
286          * @return Some text.
287          * @param aInt Some text.
288          *    Some javadoc. // warn
289          * @throws Exception Some text.
290          *    Some javadoc. // warn
291          * @param aBoolean Some text.
292          * @see Some text.
293          */
294         String method6(String aString, int aInt, boolean aBoolean) throws Exception
295         {
296             return "null";
297         }
298     };
299 }
300 
301 /**
302  * Some javadoc.
303  * 
304  * @since Some javadoc.
305  * @version 1.0
306  * @see Some javadoc.
307  *     Some javadoc.
308  *     Some javadoc.
309  * @see Some javadoc.
310  *    Some javadoc. // warn
311  * @author max
312  */
313 enum Foo1 {}
314 
315 /**
316  * Some javadoc.
317  * 
318  * @version 1.0
319  * @since Some javadoc.
320  *     Some javadoc.
321  * @serialData Some javadoc.
322  *   Line below is empty on purpose. // warn
323  * @see Some Text.
324  * L.
325  *
326  * @author max
327  * @customTag {@link com.puppycrawl.tools.checkstyle.AllChecksPresentOnAvailableChecksPageTest
328  *   some description} // no warning, as this is just inline tag description
329  */
330 interface FooIn1 {}
331 
332 /**
333  * <p>Testing javadoc with spanning tag {@linkplain #DEFAULT default mapping
334  * factory}.</p> // no warning
335  */
336 interface FooIn2 {}
337 class ShortNextLine {
338     /**
339      * Test.
340      *
341      * @return Test
342      * tt <code>null</code>.
343      */
344     public void example() {
345     }
346 }