test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java

changeset 2101
933ba3f81a87
parent 2055
184c0d6698c3
child 2147
130b8c0e570e
equal deleted inserted replaced
2100:1e7ad879f15e 2101:933ba3f81a87
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 4780441 4874845 4978816 8014017 8016328 26 * @bug 4780441 4874845 4978816 8014017 8016328 8025633
27 * @summary Make sure that when the -private flag is not used, members 27 * @summary Make sure that when the -private flag is not used, members
28 * inherited from package private class are documented in the child. 28 * inherited from package private class are documented in the child.
29 * 29 *
30 * Make sure that when a method inherits documentation from a method 30 * Make sure that when a method inherits documentation from a method
31 * in a non-public class/interface, the non-public class/interface 31 * in a non-public class/interface, the non-public class/interface
64 "fieldInheritedFromParent</a>" 64 "fieldInheritedFromParent</a>"
65 }, 65 },
66 66
67 // Method inheritence from non-public superclass. 67 // Method inheritence from non-public superclass.
68 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 68 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
69 "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent(int)\">" + 69 "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" +
70 "methodInheritedFromParent</a>" 70 "methodInheritedFromParent</a>"
71 }, 71 },
72 72
73 // Field inheritence from non-public superinterface. 73 // Field inheritence from non-public superinterface.
74 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 74 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
76 "fieldInheritedFromInterface</a>" 76 "fieldInheritedFromInterface</a>"
77 }, 77 },
78 78
79 // Method inheritence from non-public superinterface. 79 // Method inheritence from non-public superinterface.
80 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 80 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
81 "<a href=\"../pkg/PublicInterface.html#methodInterface(int)\">" + 81 "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" +
82 "methodInterface</a>" 82 "methodInterface</a>"
83 }, 83 },
84 84
85 // private class does not show up in tree 85 // private class does not show up in tree
86 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 86 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
137 "PrivateInterface"}, 137 "PrivateInterface"},
138 138
139 //Do not inherit private interface method with generic parameters. 139 //Do not inherit private interface method with generic parameters.
140 //This method has been implemented. 140 //This method has been implemented.
141 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", 141 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
142 "<span class=\"strong\"><a href=\"../pkg2/I.html#hello(T)\">hello</a></span>"}, 142 "<span class=\"strong\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"},
143 }; 143 };
144 144
145 // Test output when -private flag is used. 145 // Test output when -private flag is used.
146 private static final String[][] TEST2 = { 146 private static final String[][] TEST2 = {
147 // Field inheritence from non-public superclass. 147 // Field inheritence from non-public superclass.
169 "Methods inherited from class&nbsp;pkg." + 169 "Methods inherited from class&nbsp;pkg." +
170 "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + 170 "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
171 "PrivateParent</a>" 171 "PrivateParent</a>"
172 }, 172 },
173 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 173 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
174 "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" + 174 "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" +
175 "methodInheritedFromParent</a>" 175 "methodInheritedFromParent</a>"
176 }, 176 },
177 // Should document that a method overrides method from private class. 177 // Should document that a method overrides method from private class.
178 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 178 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
179 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 179 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
180 "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" + 180 "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" +
181 "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" + 181 "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
182 "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + 182 "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
183 "PrivateParent</a></code></dd>"}, 183 "PrivateParent</a></code></dd>"},
184 // Should document that a method is specified by private interface. 184 // Should document that a method is specified by private interface.
185 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 185 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
186 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 186 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
187 "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 187 "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
188 "methodInterface</a></code>&nbsp;in interface&nbsp;<code>" + 188 "methodInterface</a></code>&nbsp;in interface&nbsp;<code>" +
189 "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + 189 "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
190 "PrivateInterface</a></code></dd>"}, 190 "PrivateInterface</a></code></dd>"},
191 // Method inheritence from non-public superinterface. 191 // Method inheritence from non-public superinterface.
192 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", 192 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
193 "Methods inherited from interface&nbsp;pkg." + 193 "Methods inherited from interface&nbsp;pkg." +
194 "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + 194 "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
195 "PrivateInterface</a>" 195 "PrivateInterface</a>"
196 }, 196 },
197 {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html", 197 {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html",
198 "<a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 198 "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
199 "methodInterface</a>" 199 "methodInterface</a>"
200 }, 200 },
201 // Should mention that any documentation was copied. 201 // Should mention that any documentation was copied.
202 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 202 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
203 "Description copied from"}, 203 "Description copied from"},
226 226
227 //Since private flag is used, we can document that private interface method 227 //Since private flag is used, we can document that private interface method
228 //with generic parameters has been implemented. 228 //with generic parameters has been implemented.
229 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 229 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
230 "<span class=\"strong\">Description copied from interface:&nbsp;<code>" + 230 "<span class=\"strong\">Description copied from interface:&nbsp;<code>" +
231 "<a href=\"../pkg2/I.html#hello(T)\">I</a></code></span>"}, 231 "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"},
232 232
233 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 233 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
234 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 234 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
235 "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" + 235 "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" +
236 "&nbsp;in interface&nbsp;<code>" + 236 "&nbsp;in interface&nbsp;<code>" +
237 "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" + 237 "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" +
238 "&lt;java.lang.String&gt;</code></dd>"}, 238 "&lt;java.lang.String&gt;</code></dd>"},
239 239
240 //Make sure when no modifier appear in the class signature, the 240 //Make sure when no modifier appear in the class signature, the

mercurial