14952
|
1 |
/*
|
|
2 |
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
13 |
* accompanied this code).
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License version
|
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 |
*
|
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
* or visit www.oracle.com if you need additional information or have any
|
|
21 |
* questions.
|
|
22 |
*/
|
|
23 |
|
|
24 |
/*
|
|
25 |
* @test
|
14962
|
26 |
* @bug 8004832
|
|
27 |
* @summary Add new doclint package
|
14952
|
28 |
* @build DocLintTester
|
|
29 |
* @run main DocLintTester ValidTest.java
|
|
30 |
*/
|
|
31 |
|
|
32 |
class ValidTest {
|
|
33 |
/**
|
|
34 |
* < > & (
|
|
35 |
*/
|
|
36 |
void entities() { }
|
|
37 |
|
|
38 |
/**
|
|
39 |
* <h1> ... </h1>
|
|
40 |
* <h2> ... </h2>
|
|
41 |
* <h3> ... </h3>
|
|
42 |
* <h4> ... </h4>
|
|
43 |
* <h5> ... </h5>
|
|
44 |
* <h6> ... </h6>
|
|
45 |
*/
|
|
46 |
void all_headers() { }
|
|
47 |
|
|
48 |
/**
|
|
49 |
* <h1> ... </h1>
|
|
50 |
* <h2> ... </h2>
|
|
51 |
* <h3> ... </h3>
|
|
52 |
* <h1> ... </h1>
|
|
53 |
* <h2> ... </h2>
|
|
54 |
* <h3> ... </h3>
|
|
55 |
* <h2> ... </h2>
|
|
56 |
*/
|
|
57 |
void header_series() { }
|
|
58 |
|
|
59 |
/**
|
|
60 |
* <div> <p> </div>
|
|
61 |
*/
|
|
62 |
void autoclose_tags() { }
|
|
63 |
|
|
64 |
/**
|
|
65 |
* @param x
|
|
66 |
*/
|
|
67 |
void method_param(int x) { }
|
|
68 |
|
|
69 |
/**
|
|
70 |
* @param <T>
|
|
71 |
*/
|
|
72 |
<T> T method_typaram(T t) { return t; }
|
|
73 |
|
|
74 |
/**
|
|
75 |
* @param <T>
|
|
76 |
*/
|
|
77 |
class ClassTyparam<T> { }
|
|
78 |
|
|
79 |
/**
|
|
80 |
* @param <T>
|
|
81 |
*/
|
|
82 |
interface InterfaceTyparam<T> { }
|
|
83 |
|
|
84 |
/**
|
|
85 |
* @return x
|
|
86 |
*/
|
|
87 |
int return_int() { return 0; }
|
|
88 |
|
|
89 |
/**
|
|
90 |
* @exception Exception
|
|
91 |
*/
|
|
92 |
void throws_Exception1() throws Exception { }
|
|
93 |
|
|
94 |
/**
|
|
95 |
* @throws Exception
|
|
96 |
*/
|
|
97 |
void throws_Exception2() throws Exception { }
|
|
98 |
|
|
99 |
class X {
|
|
100 |
/**
|
|
101 |
* @param x
|
|
102 |
*/
|
|
103 |
X(int x) { } // constructor parameter
|
|
104 |
|
|
105 |
/**
|
|
106 |
* @param <T>
|
|
107 |
*/
|
|
108 |
<T> X(T t) { } // constructor type parameter
|
|
109 |
}
|
|
110 |
|
|
111 |
}
|
|
112 |
|