author | jjg |
Wed, 16 Apr 2014 16:17:09 -0700 | |
changeset 23971 | f5ff1f5a8dee |
parent 20238 | a08610368936 |
child 24065 | fc4022e50129 |
permissions | -rw-r--r-- |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
1 |
/* |
23971 | 2 |
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
4 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
8 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
14 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
18 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
21 |
* questions. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
22 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
23 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
24 |
/* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
25 |
* @test |
20238
a08610368936
8024096: some javadoc tests may contain false positive results
bpatel
parents:
14965
diff
changeset
|
26 |
* @bug 8002304 8024096 |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
27 |
* @summary Test for various method types in the method summary table |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
28 |
* @author Bhavesh Patel |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
29 |
* @library ../lib/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
30 |
* @build JavadocTester TestMethodTypes |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
31 |
* @run main TestMethodTypes |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
32 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
33 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
34 |
public class TestMethodTypes extends JavadocTester { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
35 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
36 |
//Test information. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
37 |
private static final String BUG_ID = "8002304"; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
38 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
39 |
//Javadoc arguments. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
40 |
private static final String[] ARGS = new String[] { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
41 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
42 |
}; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
43 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
44 |
private static final String[][] TEST = { |
23971 | 45 |
{BUG_ID + "/pkg1/A.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
46 |
"var methods = {" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
47 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
48 |
|
23971 | 49 |
{BUG_ID + "/pkg1/A.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
50 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
51 |
"Methods</span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
52 |
"<span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
53 |
"Static Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
54 |
"<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
55 |
"Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
56 |
"<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
57 |
"Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
14965
bb1eb01b8c41
8004893: the javadoc/doclet needs to be updated to accommodate lambda changes
bpatel
parents:
14549
diff
changeset
|
58 |
"<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" + |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
59 |
"Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
60 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
61 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
62 |
|
23971 | 63 |
{BUG_ID + "/pkg1/A.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
64 |
"<tr id=\"i0\" class=\"altColor\">" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
65 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
66 |
|
23971 | 67 |
{BUG_ID + "/pkg1/B.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
68 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
69 |
"Methods</span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
70 |
"<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
71 |
"Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
72 |
"<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
73 |
"Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
74 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
75 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
76 |
|
23971 | 77 |
{BUG_ID + "/pkg1/D.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
78 |
"var methods = {" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
79 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
80 |
|
23971 | 81 |
{BUG_ID + "/pkg1/D.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
82 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
83 |
"Methods</span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
84 |
"<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
85 |
"Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
86 |
"<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
87 |
"Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
88 |
"<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
89 |
"Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
14965
bb1eb01b8c41
8004893: the javadoc/doclet needs to be updated to accommodate lambda changes
bpatel
parents:
14549
diff
changeset
|
90 |
"<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" + |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
91 |
"Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
92 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
93 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
94 |
|
23971 | 95 |
{BUG_ID + "/pkg1/D.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
96 |
"<tr id=\"i0\" class=\"altColor\">" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
97 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
98 |
}; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
99 |
private static final String[][] NEGATED_TEST = { |
23971 | 100 |
{BUG_ID + "/pkg1/A.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
101 |
"<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
102 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
103 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
104 |
|
23971 | 105 |
{BUG_ID + "/pkg1/B.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
106 |
"<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
107 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
108 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
109 |
|
23971 | 110 |
{BUG_ID + "/pkg1/D.html", |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
111 |
"<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
112 |
"</caption>" |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
113 |
}, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
114 |
}; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
115 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
116 |
/** |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
117 |
* The entry point of the test. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
118 |
* @param args the array of command line arguments. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
119 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
120 |
public static void main(String[] args) { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
121 |
TestMethodTypes tester = new TestMethodTypes(); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
122 |
run(tester, ARGS, TEST, NEGATED_TEST); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
123 |
tester.printSummary(); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
124 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
125 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
126 |
/** |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
127 |
* {@inheritDoc} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
128 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
129 |
public String getBugId() { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
130 |
return BUG_ID; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
131 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
132 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
133 |
/** |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
134 |
* {@inheritDoc} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
135 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
136 |
public String getBugName() { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
137 |
return getClass().getName(); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
138 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
diff
changeset
|
139 |
} |