26 * @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567 |
26 * @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567 |
27 * @summary Run Javadoc on a set of source files that demonstrate new |
27 * @summary Run Javadoc on a set of source files that demonstrate new |
28 * language features. Check the output to ensure that the new |
28 * language features. Check the output to ensure that the new |
29 * language features are properly documented. |
29 * language features are properly documented. |
30 * @author jamieh |
30 * @author jamieh |
31 * @library ../lib/ |
31 * @library ../lib |
32 * @build JavadocTester TestNewLanguageFeatures |
32 * @build JavadocTester |
33 * @run main TestNewLanguageFeatures |
33 * @run main TestNewLanguageFeatures |
34 */ |
34 */ |
35 |
35 |
36 public class TestNewLanguageFeatures extends JavadocTester { |
36 public class TestNewLanguageFeatures extends JavadocTester { |
37 |
37 |
38 //Javadoc arguments. |
38 public static void main(String... args) throws Exception { |
39 private static final String[] ARGS = new String[] { |
39 TestNewLanguageFeatures tester = new TestNewLanguageFeatures(); |
40 "-Xdoclint:none", "-d", OUTPUT_DIR, "-use", "-sourcepath", SRC_DIR, |
40 tester.runTests(); |
41 "pkg", "pkg1", "pkg2" |
41 } |
42 }; |
42 |
43 |
43 @Test |
44 //Input for string search tests. |
44 void test() { |
45 private static final String[][] TEST = |
45 javadoc("-Xdoclint:none", |
46 { |
46 "-d", "out", |
47 //================================= |
47 "-use", "-sourcepath", |
48 // ENUM TESTING |
48 testSrc, |
49 //================================= |
49 "pkg", "pkg1", "pkg2"); |
50 //Make sure enum header is correct. |
50 checkExit(Exit.OK); |
51 { "pkg/Coin.html", "Enum Coin</h2>"}, |
51 |
52 //Make sure enum signature is correct. |
52 checkEnums(); |
53 { "pkg/Coin.html", "<pre>public enum " + |
53 checkTypeParameters(); |
54 "<span class=\"typeNameLabel\">Coin</span>\n" + |
54 checkVarArgs(); |
55 "extends java.lang.Enum<<a href=\"../pkg/Coin.html\" " + |
55 checkAnnotationTypeUsage(); |
56 "title=\"enum in pkg\">Coin</a>></pre>" |
56 } |
57 }, |
57 |
58 //Check for enum constant section |
58 //================================= |
59 { "pkg/Coin.html", "<caption><span>Enum Constants" + |
59 // ENUM TESTING |
60 "</span><span class=\"tabEnd\"> </span></caption>"}, |
60 //================================= |
61 //Detail for enum constant |
61 void checkEnums() { |
62 { "pkg/Coin.html", |
62 checkOutput("pkg/Coin.html", true, |
63 "<span class=\"memberNameLink\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>"}, |
63 // Make sure enum header is correct. |
64 //Automatically insert documentation for values() and valueOf(). |
64 "Enum Coin</h2>", |
65 { "pkg/Coin.html", |
65 // Make sure enum signature is correct. |
66 "Returns an array containing the constants of this enum type,"}, |
66 "<pre>public enum " |
67 { "pkg/Coin.html", |
67 + "<span class=\"typeNameLabel\">Coin</span>\n" |
68 "Returns the enum constant of this type with the specified name"}, |
68 + "extends java.lang.Enum<<a href=\"../pkg/Coin.html\" " |
69 { "pkg/Coin.html", "for (Coin c : Coin.values())"}, |
69 + "title=\"enum in pkg\">Coin</a>></pre>", |
70 { "pkg/Coin.html", |
70 // Check for enum constant section |
71 "Overloaded valueOf() method has correct documentation."}, |
71 "<caption><span>Enum Constants" |
72 { "pkg/Coin.html", |
72 + "</span><span class=\"tabEnd\"> </span></caption>", |
73 "Overloaded values method has correct documentation."}, |
73 // Detail for enum constant |
74 |
74 "<span class=\"memberNameLink\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>", |
75 //================================= |
75 // Automatically insert documentation for values() and valueOf(). |
76 // TYPE PARAMETER TESTING |
76 "Returns an array containing the constants of this enum type,", |
77 //================================= |
77 "Returns the enum constant of this type with the specified name", |
78 //Make sure the header is correct. |
78 "for (Coin c : Coin.values())", |
79 { "pkg/TypeParameters.html", |
79 "Overloaded valueOf() method has correct documentation.", |
80 "Class TypeParameters<E></h2>"}, |
80 "Overloaded values method has correct documentation."); |
81 //Check class type parameters section. |
81 |
82 { "pkg/TypeParameters.html", |
82 // NO constructor section |
83 "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n" + |
83 checkOutput("pkg/Coin.html", false, |
84 "<dd><code>E</code> - " + |
84 "<h3>Constructor Summary</h3>"); |
85 "the type parameter for this class."}, |
85 } |
86 //Type parameters in @see/@link |
86 |
87 { "pkg/TypeParameters.html", |
87 //================================= |
88 "<dl>\n" + |
88 // TYPE PARAMETER TESTING |
89 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
89 //================================= |
90 "<dd>" + |
90 |
91 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
91 void checkTypeParameters() { |
92 "<code>TypeParameters</code></a></dd>\n" + |
92 checkOutput("pkg/TypeParameters.html", true, |
93 "</dl>"}, |
93 // Make sure the header is correct. |
94 //Method that uses class type parameter. |
94 "Class TypeParameters<E></h2>", |
95 { "pkg/TypeParameters.html", |
95 // Check class type parameters section. |
96 "(<a href=\"../pkg/TypeParameters.html\" title=\"type " + |
96 "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n" |
97 "parameter in TypeParameters\">E</a> param)"}, |
97 + "<dd><code>E</code> - " |
98 //Method type parameter section. |
98 + "the type parameter for this class.", |
99 { "pkg/TypeParameters.html", |
99 // Type parameters in @see/@link |
100 "<span class=\"paramLabel\">Type Parameters:</span></dt>\n" + |
100 "<dl>\n" |
101 "<dd><code>T</code> - This is the first " + |
101 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" |
102 "type parameter.</dd>\n" + |
102 + "<dd>" |
103 "<dd><code>V</code> - This is the second type " + |
103 + "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
104 "parameter."}, |
104 + "<code>TypeParameters</code></a></dd>\n" |
105 //Signature of method with type parameters |
105 + "</dl>", |
106 { "pkg/TypeParameters.html", |
106 // Method that uses class type parameter. |
107 "public <T extends java.util.List,V> " + |
107 "(<a href=\"../pkg/TypeParameters.html\" title=\"type " |
108 "java.lang.String[] methodThatHasTypeParameters"}, |
108 + "parameter in TypeParameters\">E</a> param)", |
109 //Wildcard testing. |
109 // Method type parameter section. |
110 { "pkg/Wildcards.html", |
110 "<span class=\"paramLabel\">Type Parameters:</span></dt>\n" |
111 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
111 + "<dd><code>T</code> - This is the first " |
112 "TypeParameters</a><? super java.lang.String> a"}, |
112 + "type parameter.</dd>\n" |
113 { "pkg/Wildcards.html", |
113 + "<dd><code>V</code> - This is the second type " |
114 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
114 + "parameter.", |
115 "TypeParameters</a><? extends java.lang.StringBuffer> b"}, |
115 // Signature of method with type parameters |
116 { "pkg/Wildcards.html", |
116 "public <T extends java.util.List,V> " |
117 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
117 + "java.lang.String[] methodThatHasTypeParameters"); |
118 "TypeParameters</a> c"}, |
118 |
119 //Bad type parameter warnings. |
119 checkOutput("pkg/Wildcards.html", true, |
120 {WARNING_OUTPUT, "warning - @param argument " + |
120 // Wildcard testing. |
121 "\"<BadClassTypeParam>\" is not a type parameter name."}, |
121 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
122 {WARNING_OUTPUT, "warning - @param argument " + |
122 + "TypeParameters</a><? super java.lang.String> a", |
123 "\"<BadMethodTypeParam>\" is not a type parameter name."}, |
123 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
124 |
124 + "TypeParameters</a><? extends java.lang.StringBuffer> b", |
125 //Signature of subclass that has type parameters. |
125 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
126 { "pkg/TypeParameterSubClass.html", |
126 + "TypeParameters</a> c"); |
127 "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass<T extends " + |
127 |
128 "java.lang.String></span>\n" + |
128 checkOutput(Output.WARNING, true, |
129 "extends " + |
129 // Bad type parameter warnings. |
130 "<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">" + |
130 "warning - @param argument " |
131 "TypeParameterSuperClass</a><T></pre>"}, |
131 + "\"<BadClassTypeParam>\" is not a type parameter name.", |
132 |
132 "warning - @param argument " |
133 //Interface generic parameter substitution |
133 + "\"<BadMethodTypeParam>\" is not a type parameter name."); |
134 //Signature of subclass that has type parameters. |
134 |
135 { "pkg/TypeParameters.html", |
135 // Signature of subclass that has type parameters. |
136 "<dl>\n" + |
136 checkOutput("pkg/TypeParameterSubClass.html", true, |
137 "<dt>All Implemented Interfaces:</dt>\n" + |
137 "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass<T extends " |
138 "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">" + |
138 + "java.lang.String></span>\n" |
139 "SubInterface</a><E>, <a href=\"../pkg/SuperInterface.html\" " + |
139 + "extends " |
140 "title=\"interface in pkg\">SuperInterface</a><E></dd>\n" + |
140 + "<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">" |
141 "</dl>"}, |
141 + "TypeParameterSuperClass</a><T></pre>"); |
142 { "pkg/SuperInterface.html", |
142 |
143 "<dl>\n" + |
143 // Interface generic parameter substitution |
144 "<dt>All Known Subinterfaces:</dt>\n" + |
144 // Signature of subclass that has type parameters. |
145 "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">" + |
145 checkOutput("pkg/TypeParameters.html", true, |
146 "SubInterface</a><V></dd>\n" + |
146 "<dl>\n" |
147 "</dl>"}, |
147 + "<dt>All Implemented Interfaces:</dt>\n" |
148 { "pkg/SubInterface.html", |
148 + "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">" |
149 "<dl>\n" + |
149 + "SubInterface</a><E>, <a href=\"../pkg/SuperInterface.html\" " |
150 "<dt>All Superinterfaces:</dt>\n" + |
150 + "title=\"interface in pkg\">SuperInterface</a><E></dd>\n" |
151 "<dd><a href=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">" + |
151 + "</dl>"); |
152 "SuperInterface</a><V></dd>\n" + |
152 |
153 "</dl>"}, |
153 checkOutput("pkg/SuperInterface.html", true, |
154 |
154 "<dl>\n" |
155 //================================= |
155 + "<dt>All Known Subinterfaces:</dt>\n" |
156 // VAR ARG TESTING |
156 + "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">" |
157 //================================= |
157 + "SubInterface</a><V></dd>\n" |
158 { "pkg/VarArgs.html", "(int... i)"}, |
158 + "</dl>"); |
159 { "pkg/VarArgs.html", "(int[][]... i)"}, |
159 checkOutput("pkg/SubInterface.html", true, |
160 { "pkg/VarArgs.html", "-int:A...-"}, |
160 "<dl>\n" |
161 { "pkg/VarArgs.html", |
161 + "<dt>All Superinterfaces:</dt>\n" |
162 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
162 + "<dd><a href=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">" |
163 "TypeParameters</a>... t"}, |
163 + "SuperInterface</a><V></dd>\n" |
164 |
164 + "</dl>"); |
165 //================================= |
165 |
166 // ANNOTATION TYPE TESTING |
166 //============================================================== |
167 //================================= |
167 // Handle multiple bounds. |
168 //Make sure the summary links are correct. |
168 //============================================================== |
169 { "pkg/AnnotationType.html", |
169 checkOutput("pkg/MultiTypeParameters.html", true, |
170 "<li>Summary: </li>\n" + |
170 "public <T extends java.lang.Number & java.lang.Runnable> T foo(T t)"); |
171 "<li>Field | </li>\n" + |
171 |
172 "<li><a href=\"#annotation.type.required.element.summary\">" + |
172 //============================================================== |
173 "Required</a> | </li>\n" + |
173 // Test Class-Use Documentation for Type Parameters. |
174 "<li>" + |
174 //============================================================== |
175 "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>"}, |
175 // ClassUseTest1: <T extends Foo & Foo2> |
176 //Make sure the detail links are correct. |
176 checkOutput("pkg2/class-use/Foo.html", true, |
177 { "pkg/AnnotationType.html", |
177 "<caption><span>Classes in <a href=\"../../pkg2/" |
178 "<li>Detail: </li>\n" + |
178 + "package-summary.html\">pkg2</a> with type parameters of " |
179 "<li>Field | </li>\n" + |
179 + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" |
180 "<li><a href=\"#annotation.type.element.detail\">Element</a></li>"}, |
180 + "Foo</a></span><span class=\"tabEnd\"> </span></caption>", |
181 //Make sure the heading is correct. |
181 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " |
182 { "pkg/AnnotationType.html", |
182 + "title=\"class in pkg2\">ClassUseTest1</a><T extends " |
183 "Annotation Type AnnotationType</h2>"}, |
183 + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" |
184 //Make sure the signature is correct. |
184 + "</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" |
185 { "pkg/AnnotationType.html", |
185 + "Foo2</a>></span></code> </td>", |
186 "public @interface <span class=\"memberNameLabel\">AnnotationType</span>"}, |
186 "<caption><span>Methods in <a href=\"../../pkg2/" |
187 //Make sure member summary headings are correct. |
187 + "package-summary.html\">pkg2</a> with type parameters of " |
188 { "pkg/AnnotationType.html", |
188 + "type <a href=\"../../pkg2/Foo.html\" title=\"class in " |
189 "<h3>Required Element Summary</h3>"}, |
189 + "pkg2\">Foo</a></span><span class=\"tabEnd\"> </span></caption>", |
190 { "pkg/AnnotationType.html", |
190 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest1." |
191 "<h3>Optional Element Summary</h3>"}, |
191 + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" |
192 //Make sure element detail heading is correct |
192 + "ClassUseTest1.html#method-T-\">method</a></span>" |
193 { "pkg/AnnotationType.html", |
193 + "(T t)</code> </td>", |
194 "Element Detail"}, |
194 "<caption><span>Fields in <a href=\"../../pkg2/" |
195 //Make sure default annotation type value is printed when necessary. |
195 + "package-summary.html\">pkg2</a> with type parameters of " |
196 { "pkg/AnnotationType.html", |
196 + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" |
197 "<dl>\n" + |
197 + "Foo</a></span><span class=\"tabEnd\"> </span></caption>", |
198 "<dt>Default:</dt>\n" + |
198 "td class=\"colFirst\"><code><a href=\"../../pkg2/" |
199 "<dd>\"unknown\"</dd>\n" + |
199 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" |
200 "</dl>"}, |
200 + "<<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\"" |
201 |
201 + ">Foo</a>></code></td>" |
202 //================================= |
202 ); |
203 // ANNOTATION TYPE USAGE TESTING |
203 |
204 //================================= |
204 checkOutput("pkg2/class-use/ParamTest.html", true, |
205 |
205 "<caption><span>Fields in <a href=\"../../pkg2/" |
206 //PACKAGE |
206 + "package-summary.html\">pkg2</a> declared as <a href=\"../" |
207 { "pkg/package-summary.html", |
207 + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" |
208 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n" + |
208 + "</a></span><span class=\"tabEnd\"> </span></caption>", |
209 " <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)"}, |
209 "<td class=\"colFirst\"><code><a href=\"../../pkg2/" |
210 |
210 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a><<a " |
211 //CLASS |
211 + "href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</a" |
212 { "pkg/AnnotationTypeUsage.html", |
212 + ">></code></td>" |
213 "<pre><a href=\"../pkg/AnnotationType.html\" " + |
213 ); |
214 "title=\"annotation in pkg\">@AnnotationType</a>(" + |
214 |
215 "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + |
215 checkOutput("pkg2/class-use/Foo2.html", true, |
216 "=\"Class Annotation\",\n" + |
216 "<caption><span>Classes in <a href=\"../../pkg2/" |
217 " <a href=\"../pkg/AnnotationType.html#required--\">" + |
217 + "package-summary.html\">pkg2</a> with type parameters of " |
218 "required</a>=1994)\n" + |
218 + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface " |
219 "public class <span class=\"typeNameLabel\">" + |
219 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\"> " |
220 "AnnotationTypeUsage</span>\n" + |
220 + "</span></caption>", |
221 "extends java.lang.Object</pre>"}, |
221 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " |
222 |
222 + "title=\"class in pkg2\">ClassUseTest1</a><T extends " |
223 //FIELD |
223 + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" |
224 { "pkg/AnnotationTypeUsage.html", |
224 + "</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" |
225 "<pre><a href=\"../pkg/AnnotationType.html\" " + |
225 + "Foo2</a>></span></code> </td>", |
226 "title=\"annotation in pkg\">@AnnotationType</a>(" + |
226 "<caption><span>Methods in <a href=\"../../pkg2/" |
227 "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + |
227 + "package-summary.html\">pkg2</a> with type parameters of " |
228 "=\"Field Annotation\",\n" + |
228 + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface " |
229 " <a href=\"../pkg/AnnotationType.html#required--\">" + |
229 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\"> " |
230 "required</a>=1994)\n" + |
230 + "</span></caption>", |
231 "public int field</pre>"}, |
231 "<td class=\"colLast\"><span class=\"typeNameLabel\">" |
232 |
232 + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../../" |
233 //CONSTRUCTOR |
233 + "pkg2/ClassUseTest1.html#method-T-\">method</a></span>" |
234 { "pkg/AnnotationTypeUsage.html", |
234 + "(T t)</code> </td>" |
235 "<pre><a href=\"../pkg/AnnotationType.html\" " + |
235 ); |
236 "title=\"annotation in pkg\">@AnnotationType</a>(" + |
236 |
237 "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + |
237 // ClassUseTest2: <T extends ParamTest<Foo3>> |
238 "=\"Constructor Annotation\",\n" + |
238 checkOutput("pkg2/class-use/ParamTest.html", true, |
239 " <a href=\"../pkg/AnnotationType.html#required--\">" + |
239 "<caption><span>Classes in <a href=\"../../pkg2/" |
240 "required</a>=1994)\n" + |
240 + "package-summary.html\">pkg2</a> with type parameters of " |
241 "public AnnotationTypeUsage()</pre>"}, |
241 + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " |
242 |
242 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" |
243 //METHOD |
243 + " </span></caption>", |
244 { "pkg/AnnotationTypeUsage.html", |
244 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " |
245 "<pre><a href=\"../pkg/AnnotationType.html\" " + |
245 + "title=\"class in pkg2\">ClassUseTest2</a><T extends " |
246 "title=\"annotation in pkg\">@AnnotationType</a>(" + |
246 + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" |
247 "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + |
247 + "ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" |
248 "=\"Method Annotation\",\n" + |
248 + "Foo3</a>>></span></code> </td>", |
249 " <a href=\"../pkg/AnnotationType.html#required--\">" + |
249 "<caption><span>Methods in <a href=\"../../pkg2/" |
250 "required</a>=1994)\n" + |
250 + "package-summary.html\">pkg2</a> with type parameters of " |
251 "public void method()</pre>"}, |
251 + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " |
252 |
252 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" |
253 //METHOD PARAMS |
253 + " </span></caption>", |
254 { "pkg/AnnotationTypeUsage.html", |
254 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." |
255 "<pre>public void methodWithParams(" + |
255 + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" |
256 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" + |
256 + "ClassUseTest2.html#method-T-\">method</a></span>" |
257 "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" + |
257 + "(T t)</code> </td>", |
258 "optional</a>=\"Parameter Annotation\",<a " + |
258 "<caption><span>Fields in <a href=\"../../pkg2/" |
259 "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n" + |
259 + "package-summary.html\">pkg2</a> declared as <a href=\"../" |
260 " int documented,\n" + |
260 + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" |
261 " int undocmented)</pre>"}, |
261 + "</a></span><span class=\"tabEnd\"> </span></caption>", |
262 |
262 "<td class=\"colFirst\"><code><a href=\"../../pkg2/" |
263 //CONSTRUCTOR PARAMS |
263 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" |
264 { "pkg/AnnotationTypeUsage.html", |
264 + "<<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" |
265 "<pre>public AnnotationTypeUsage(<a " + |
265 + "Foo</a>></code></td>", |
266 "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" + |
266 "<caption><span>Methods in <a href=\"../../pkg2/" |
267 "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" + |
267 + "package-summary.html\">pkg2</a> with type parameters of " |
268 "optional</a>=\"Constructor Param Annotation\",<a " + |
268 + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " |
269 "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n" + |
269 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" |
270 " int documented,\n" + |
270 + " </span></caption>", |
271 " int undocmented)</pre>"}, |
271 "<td class=\"colFirst\"><code><T extends <a href=\"../" |
272 |
272 + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" |
273 //================================= |
273 + "</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in " |
274 // ANNOTATION TYPE USAGE TESTING (All Different Types). |
274 + "pkg2\">Foo3</a>>><br><a href=\"../../pkg2/" |
275 //================================= |
275 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" |
276 |
276 + "<<a href=\"../../pkg2/Foo3.html\" title=\"class in " |
277 //Integer |
277 + "pkg2\">Foo3</a>></code></td>" |
278 { "pkg1/B.html", |
278 ); |
279 "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"}, |
279 |
280 |
280 checkOutput("pkg2/class-use/Foo3.html", true, |
281 //Double |
281 "<caption><span>Classes in <a href=\"../../pkg2/" |
282 { "pkg1/B.html", |
282 + "package-summary.html\">pkg2</a> with type parameters of " |
283 "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"}, |
283 + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" |
284 |
284 + "Foo3</a></span><span class=\"tabEnd\"> </span></caption>", |
285 //Boolean |
285 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " |
286 { "pkg1/B.html", |
286 + "title=\"class in pkg2\">ClassUseTest2</a><T extends " |
287 "<a href=\"../pkg1/A.html#b--\">b</a>=true,"}, |
287 + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" |
288 |
288 + "ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" |
289 //String |
289 + "Foo3</a>>></span></code> </td>", |
290 { "pkg1/B.html", |
290 "<caption><span>Methods in <a href=\"../../pkg2/" |
291 "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\","}, |
291 + "package-summary.html\">pkg2</a> with type parameters of " |
292 |
292 + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in " |
293 //Class |
293 + "pkg2\">Foo3</a></span><span class=\"tabEnd\"> " |
294 { "pkg1/B.html", |
294 + "</span></caption>", |
295 "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"}, |
295 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." |
296 |
296 + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" |
297 //Bounded Class |
297 + "ClassUseTest2.html#method-T-\">method</a></span>" |
298 { "pkg1/B.html", |
298 + "(T t)</code> </td>", |
299 "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"}, |
299 "<caption><span>Methods in <a href=\"../../pkg2/" |
300 |
300 + "package-summary.html\">pkg2</a> that return types with " |
301 //Enum |
301 + "arguments of type <a href=\"../../pkg2/Foo3.html\" title" |
302 { "pkg1/B.html", |
302 + "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">" |
303 "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"}, |
303 + " </span></caption>", |
304 |
304 "<td class=\"colFirst\"><code><T extends <a href=\"../../" |
305 //Annotation Type |
305 + "pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</a><" |
306 { "pkg1/B.html", |
306 + "<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3" |
307 "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),"}, |
307 + "</a>>><br><a href=\"../../pkg2/ParamTest.html\" " |
308 |
308 + "title=\"class in pkg2\">ParamTest</a><<a href=\"../../pkg2/" |
309 //String Array |
309 + "Foo3.html\" title=\"class in pkg2\">Foo3</a>></code></td>" |
310 { "pkg1/B.html", |
310 ); |
311 "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},"}, |
311 |
312 |
312 // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>> |
313 //Primitive |
313 checkOutput("pkg2/class-use/ParamTest2.html", true, |
314 { "pkg1/B.html", |
314 "<caption><span>Classes in <a href=\"../../pkg2/" |
315 "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,"}, |
315 + "package-summary.html\">pkg2</a> with type parameters of " |
316 |
316 + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class " |
317 //XXX: Add array test case after this if fixed: |
317 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">" |
318 //5020899: Incorrect internal representation of class-valued annotation elements |
318 + " </span></caption>", |
319 |
319 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " |
320 //Make sure that annotations are surrounded by <pre> and </pre> |
320 + "title=\"class in pkg2\">ClassUseTest3</a><T extends " |
321 { "pkg1/B.html", |
321 + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" |
322 "<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>"}, |
322 + "ParamTest2</a><java.util.List<? extends " |
323 { "pkg1/B.html", |
323 + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" |
324 "public interface <span class=\"typeNameLabel\">B</span></pre>"}, |
324 + "Foo4</a>>>></span></code> </td>", |
325 |
325 "<caption><span>Methods in <a href=\"../../pkg2/" |
326 |
326 + "package-summary.html\">pkg2</a> with type parameters of " |
327 //============================================================== |
327 + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class " |
328 // Handle multiple bounds. |
328 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">" |
329 //============================================================== |
329 + " </span></caption>", |
330 { "pkg/MultiTypeParameters.html", |
330 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3" |
331 "public <T extends java.lang.Number & java.lang.Runnable> T foo(T t)"}, |
331 + ".</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." |
332 |
332 + "html#method-T-\">method</a></span>(T t)</code> </td>", |
333 //============================================================== |
333 "<td class=\"colFirst\"><code><T extends <a href=\"../" |
334 // Test Class-Use Documenation for Type Parameters. |
334 + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">" |
335 //============================================================== |
335 + "ParamTest2</a><java.util.List<? extends <a href=\".." |
336 |
336 + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>>" |
337 //ClassUseTest1: <T extends Foo & Foo2> |
337 + ">><br><a href=\"../../pkg2/ParamTest2.html\" " |
338 { "pkg2/class-use/Foo.html", |
338 + "title=\"class in pkg2\">ParamTest2</a><java.util.List" |
339 "<caption><span>Classes in <a href=\"../../pkg2/" + |
339 + "<? extends <a href=\"../../pkg2/Foo4.html\" title=\"" |
340 "package-summary.html\">pkg2</a> with type parameters of " + |
340 + "class in pkg2\">Foo4</a>>></code></td>" |
341 "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" + |
341 ); |
342 "Foo</a></span><span class=\"tabEnd\"> </span></caption>" |
342 |
343 }, |
343 checkOutput("pkg2/class-use/Foo4.html", true, |
344 { "pkg2/class-use/Foo.html", |
344 "<caption><span>Classes in <a href=\"../../pkg2/" |
345 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " + |
345 + "package-summary.html\">pkg2</a> with type parameters of " |
346 "title=\"class in pkg2\">ClassUseTest1</a><T extends " + |
346 + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " |
347 "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" + |
347 + "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " |
348 "</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" + |
348 + "</span></caption>", |
349 "Foo2</a>></span></code> </td>" |
349 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " |
350 }, |
350 + "title=\"class in pkg2\">ClassUseTest3</a><T extends " |
351 { "pkg2/class-use/Foo.html", |
351 + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" |
352 "<caption><span>Methods in <a href=\"../../pkg2/" + |
352 + "ParamTest2</a><java.util.List<? extends " |
353 "package-summary.html\">pkg2</a> with type parameters of " + |
353 + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" |
354 "type <a href=\"../../pkg2/Foo.html\" title=\"class in " + |
354 + "Foo4</a>>>></span></code> </td>", |
355 "pkg2\">Foo</a></span><span class=\"tabEnd\"> </span></caption>" |
355 "<caption><span>Methods in <a href=\"../../pkg2/" |
356 }, |
356 + "package-summary.html\">pkg2</a> with type parameters of " |
357 { "pkg2/class-use/Foo.html", |
357 + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " |
358 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest1." + |
358 + "pkg2\">Foo4</a></span><span class=\"tabEnd\"> </span></caption>", |
359 "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" + |
359 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." |
360 "ClassUseTest1.html#method-T-\">method</a></span>" + |
360 + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." |
361 "(T t)</code> </td>" |
361 + "html#method-T-\">method</a></span>(T t)</code>" |
362 }, |
362 + " </td>", |
363 { "pkg2/class-use/Foo.html", |
363 "<caption><span>Methods in <a href=\"../../pkg2/" |
364 "<caption><span>Fields in <a href=\"../../pkg2/" + |
364 + "package-summary.html\">pkg2</a> that return types with " |
365 "package-summary.html\">pkg2</a> with type parameters of " + |
365 + "arguments of type <a href=\"../../pkg2/Foo4.html\" " |
366 "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" + |
366 + "title=\"class in pkg2\">Foo4</a></span><span class=\"" |
367 "Foo</a></span><span class=\"tabEnd\"> </span></caption>" |
367 + "tabEnd\"> </span></caption>", |
368 }, |
368 "<td class=\"colFirst\"><code><T extends <a href=\"../" |
369 { "pkg2/class-use/Foo.html", |
369 + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">" |
370 "td class=\"colFirst\"><code><a href=\"../../pkg2/" + |
370 + "ParamTest2</a><java.util.List<? extends <a href=\".." |
371 "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" + |
371 + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>>" |
372 "<<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\"" + |
372 + ">><br><a href=\"../../pkg2/ParamTest2.html\" " |
373 ">Foo</a>></code></td>" |
373 + "title=\"class in pkg2\">ParamTest2</a><java.util.List" |
374 }, |
374 + "<? extends <a href=\"../../pkg2/Foo4.html\" title=\"" |
375 |
375 + "class in pkg2\">Foo4</a>>></code></td>" |
376 { "pkg2/class-use/ParamTest.html", |
376 ); |
377 "<caption><span>Fields in <a href=\"../../pkg2/" + |
377 |
378 "package-summary.html\">pkg2</a> declared as <a href=\"../" + |
378 // Type parameters in constructor and method args |
379 "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" + |
379 checkOutput("pkg2/class-use/Foo4.html", true, |
380 "</a></span><span class=\"tabEnd\"> </span></caption>" |
380 "<caption><span>Method parameters in <a href=\"../../pkg2/" |
381 }, |
381 + "package-summary.html\">pkg2</a> with type arguments of " |
382 { "pkg2/class-use/ParamTest.html", |
382 + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " |
383 "<td class=\"colFirst\"><code><a href=\"../../pkg2/" + |
383 + "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " |
384 "ParamTest.html\" title=\"class in pkg2\">ParamTest</a><<a " + |
384 + "</span></caption>\n" |
385 "href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</a" + |
385 + "<tr>\n" |
386 ">></code></td>" |
386 + "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" |
387 }, |
387 + "<th class=\"colLast\" scope=\"col\">Method and Description</th>\n" |
388 |
388 + "</tr>\n" |
389 { "pkg2/class-use/Foo2.html", |
389 + "<tbody>\n" |
390 "<caption><span>Classes in <a href=\"../../pkg2/" + |
390 + "<tr class=\"altColor\">\n" |
391 "package-summary.html\">pkg2</a> with type parameters of " + |
391 + "<td class=\"colFirst\"><code>void</code></td>\n" |
392 "type <a href=\"../../pkg2/Foo2.html\" title=\"interface " + |
392 + "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." |
393 "in pkg2\">Foo2</a></span><span class=\"tabEnd\"> " + |
393 + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." |
394 "</span></caption>" |
394 + "html#method-java.util.Set-\">method</a></span>(java." |
395 }, |
395 + "util.Set<<a href=\"../../pkg2/Foo4.html\" title=\"" |
396 { "pkg2/class-use/Foo2.html", |
396 + "class in pkg2\">Foo4</a>> p)</code> </td>\n" |
397 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" " + |
397 + "</tr>\n" |
398 "title=\"class in pkg2\">ClassUseTest1</a><T extends " + |
398 + "</tbody>", |
399 "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo" + |
399 "<caption><span>Constructor parameters in <a href=\"../../" |
400 "</a> & <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">" + |
400 + "pkg2/package-summary.html\">pkg2</a> with type arguments " |
401 "Foo2</a>></span></code> </td>" |
401 + "of type <a href=\"../../pkg2/Foo4.html\" title=\"class in " |
402 }, |
402 + "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " |
403 { "pkg2/class-use/Foo2.html", |
403 + "</span></caption>" |
404 "<caption><span>Methods in <a href=\"../../pkg2/" + |
404 ); |
405 "package-summary.html\">pkg2</a> with type parameters of " + |
405 |
406 "type <a href=\"../../pkg2/Foo2.html\" title=\"interface " + |
406 //================================= |
407 "in pkg2\">Foo2</a></span><span class=\"tabEnd\"> " + |
407 // TYPE PARAMETER IN INDEX |
408 "</span></caption>" |
408 //================================= |
409 }, |
409 checkOutput("index-all.html", true, |
410 { "pkg2/class-use/Foo2.html", |
410 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" |
411 "<td class=\"colLast\"><span class=\"typeNameLabel\">" + |
411 + "method(Vector<Object>)</a></span>" |
412 "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../../" + |
412 ); |
413 "pkg2/ClassUseTest1.html#method-T-\">method</a></span>" + |
413 |
414 "(T t)</code> </td>" |
414 // TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing |
415 }, |
415 //================================= |
416 |
416 // TYPE PARAMETER IN INDEX |
417 //ClassUseTest2: <T extends ParamTest<Foo3>> |
417 //================================= |
418 { "pkg2/class-use/ParamTest.html", |
418 checkOutput("index-all.html", true, |
419 "<caption><span>Classes in <a href=\"../../pkg2/" + |
419 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" |
420 "package-summary.html\">pkg2</a> with type parameters of " + |
420 + "method(Vector<Object>)</a></span>" |
421 "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " + |
421 ); |
422 "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" + |
422 |
423 " </span></caption>" |
423 // No type parameters in class frame. |
424 }, |
424 checkOutput("allclasses-frame.html", false, |
425 { "pkg2/class-use/ParamTest.html", |
425 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
426 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " + |
426 + "TypeParameters</a><<a href=\"../pkg/TypeParameters.html\" " |
427 "title=\"class in pkg2\">ClassUseTest2</a><T extends " + |
427 + "title=\"type parameter in TypeParameters\">E</a>>" |
428 "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" + |
428 ); |
429 "ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" + |
429 |
430 "Foo3</a>>></span></code> </td>" |
430 } |
431 }, |
431 |
432 { "pkg2/class-use/ParamTest.html", |
432 //================================= |
433 "<caption><span>Methods in <a href=\"../../pkg2/" + |
433 // VAR ARG TESTING |
434 "package-summary.html\">pkg2</a> with type parameters of " + |
434 //================================= |
435 "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " + |
435 void checkVarArgs() { |
436 "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" + |
436 checkOutput("pkg/VarArgs.html", true, |
437 " </span></caption>" |
437 "(int... i)", |
438 }, |
438 "(int[][]... i)", |
439 { "pkg2/class-use/ParamTest.html", |
439 "-int:A...-", |
440 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." + |
440 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" |
441 "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" + |
441 + "TypeParameters</a>... t"); |
442 "ClassUseTest2.html#method-T-\">method</a></span>" + |
442 } |
443 "(T t)</code> </td>" |
443 |
444 }, |
444 //================================= |
445 { "pkg2/class-use/ParamTest.html", |
445 // ANNOTATION TYPE TESTING |
446 "<caption><span>Fields in <a href=\"../../pkg2/" + |
446 //================================= |
447 "package-summary.html\">pkg2</a> declared as <a href=\"../" + |
447 void checkAnnotationTypes() { |
448 "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" + |
448 checkOutput("pkg/AnnotationType.html", true, |
449 "</a></span><span class=\"tabEnd\"> </span></caption>" |
449 // Make sure the summary links are correct. |
450 }, |
450 "<li>Summary: </li>\n" |
451 { "pkg2/class-use/ParamTest.html", |
451 + "<li>Field | </li>\n" |
452 "<td class=\"colFirst\"><code><a href=\"../../pkg2/" + |
452 + "<li><a href=\"#annotation.type.required.element.summary\">" |
453 "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" + |
453 + "Required</a> | </li>\n" |
454 "<<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">" + |
454 + "<li>" |
455 "Foo</a>></code></td>" |
455 + "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>", |
456 }, |
456 // Make sure the detail links are correct. |
457 { "pkg2/class-use/ParamTest.html", |
457 "<li>Detail: </li>\n" |
458 "<caption><span>Methods in <a href=\"../../pkg2/" + |
458 + "<li>Field | </li>\n" |
459 "package-summary.html\">pkg2</a> with type parameters of " + |
459 + "<li><a href=\"#annotation.type.element.detail\">Element</a></li>", |
460 "type <a href=\"../../pkg2/ParamTest.html\" title=\"class " + |
460 // Make sure the heading is correct. |
461 "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">" + |
461 "Annotation Type AnnotationType</h2>", |
462 " </span></caption>" |
462 // Make sure the signature is correct. |
463 }, |
463 "public @interface <span class=\"memberNameLabel\">AnnotationType</span>", |
464 { "pkg2/class-use/ParamTest.html", |
464 // Make sure member summary headings are correct. |
465 "<td class=\"colFirst\"><code><T extends <a href=\"../" + |
465 "<h3>Required Element Summary</h3>", |
466 "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest" + |
466 "<h3>Optional Element Summary</h3>", |
467 "</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in " + |
467 // Make sure element detail heading is correct |
468 "pkg2\">Foo3</a>>><br><a href=\"../../pkg2/" + |
468 "Element Detail", |
469 "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>" + |
469 // Make sure default annotation type value is printed when necessary. |
470 "<<a href=\"../../pkg2/Foo3.html\" title=\"class in " + |
470 "<dl>\n" |
471 "pkg2\">Foo3</a>></code></td>" |
471 + "<dt>Default:</dt>\n" |
472 }, |
472 + "<dd>\"unknown\"</dd>\n" |
473 |
473 + "</dl>"); |
474 { "pkg2/class-use/Foo3.html", |
474 } |
475 "<caption><span>Classes in <a href=\"../../pkg2/" + |
475 |
476 "package-summary.html\">pkg2</a> with type parameters of " + |
476 //================================= |
477 "type <a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" + |
477 // ANNOTATION TYPE USAGE TESTING |
478 "Foo3</a></span><span class=\"tabEnd\"> </span></caption>" |
478 //================================= |
479 }, |
479 void checkAnnotationTypeUsage() { |
480 { "pkg2/class-use/Foo3.html", |
480 checkOutput("pkg/package-summary.html", true, |
481 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" " + |
481 // PACKAGE |
482 "title=\"class in pkg2\">ClassUseTest2</a><T extends " + |
482 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n" |
483 "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">" + |
483 + " <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)"); |
484 "ParamTest</a><<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">" + |
484 |
485 "Foo3</a>>></span></code> </td>" |
485 checkOutput("pkg/AnnotationTypeUsage.html", true, |
486 }, |
486 // CLASS |
487 { "pkg2/class-use/Foo3.html", |
487 "<pre><a href=\"../pkg/AnnotationType.html\" " |
488 "<caption><span>Methods in <a href=\"../../pkg2/" + |
488 + "title=\"annotation in pkg\">@AnnotationType</a>(" |
489 "package-summary.html\">pkg2</a> with type parameters of " + |
489 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" |
490 "type <a href=\"../../pkg2/Foo3.html\" title=\"class in " + |
490 + "=\"Class Annotation\",\n" |
491 "pkg2\">Foo3</a></span><span class=\"tabEnd\"> " + |
491 + " <a href=\"../pkg/AnnotationType.html#required--\">" |
492 "</span></caption>" |
492 + "required</a>=1994)\n" |
493 }, |
493 + "public class <span class=\"typeNameLabel\">" |
494 { "pkg2/class-use/Foo3.html", |
494 + "AnnotationTypeUsage</span>\n" |
495 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2." + |
495 + "extends java.lang.Object</pre>", |
496 "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/" + |
496 // FIELD |
497 "ClassUseTest2.html#method-T-\">method</a></span>" + |
497 "<pre><a href=\"../pkg/AnnotationType.html\" " |
498 "(T t)</code> </td>" |
498 + "title=\"annotation in pkg\">@AnnotationType</a>(" |
499 }, |
499 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" |
500 { "pkg2/class-use/Foo3.html", |
500 + "=\"Field Annotation\",\n" |
501 "<caption><span>Methods in <a href=\"../../pkg2/" + |
501 + " <a href=\"../pkg/AnnotationType.html#required--\">" |
502 "package-summary.html\">pkg2</a> that return types with " + |
502 + "required</a>=1994)\n" |
503 "arguments of type <a href=\"../../pkg2/Foo3.html\" title" + |
503 + "public int field</pre>", |
504 "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">" + |
504 // CONSTRUCTOR |
505 " </span></caption>" |
505 "<pre><a href=\"../pkg/AnnotationType.html\" " |
506 }, |
506 + "title=\"annotation in pkg\">@AnnotationType</a>(" |
507 { "pkg2/class-use/Foo3.html", |
507 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" |
508 "<td class=\"colFirst\"><code><T extends <a href=\"../../" + |
508 + "=\"Constructor Annotation\",\n" |
509 "pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</a><" + |
509 + " <a href=\"../pkg/AnnotationType.html#required--\">" |
510 "<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3" + |
510 + "required</a>=1994)\n" |
511 "</a>>><br><a href=\"../../pkg2/ParamTest.html\" " + |
511 + "public AnnotationTypeUsage()</pre>", |
512 "title=\"class in pkg2\">ParamTest</a><<a href=\"../../pkg2/" + |
512 // METHOD |
513 "Foo3.html\" title=\"class in pkg2\">Foo3</a>></code></td>" |
513 "<pre><a href=\"../pkg/AnnotationType.html\" " |
514 }, |
514 + "title=\"annotation in pkg\">@AnnotationType</a>(" |
515 |
515 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" |
516 //ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>> |
516 + "=\"Method Annotation\",\n" |
517 { "pkg2/class-use/ParamTest2.html", |
517 + " <a href=\"../pkg/AnnotationType.html#required--\">" |
518 "<caption><span>Classes in <a href=\"../../pkg2/" + |
518 + "required</a>=1994)\n" |
519 "package-summary.html\">pkg2</a> with type parameters of " + |
519 + "public void method()</pre>", |
520 "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class " + |
520 // METHOD PARAMS |
521 "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">" + |
521 "<pre>public void methodWithParams(" |
522 " </span></caption>" |
522 + "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" |
523 }, |
523 + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" |
524 { "pkg2/class-use/ParamTest2.html", |
524 + "optional</a>=\"Parameter Annotation\",<a " |
525 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " + |
525 + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n" |
526 "title=\"class in pkg2\">ClassUseTest3</a><T extends " + |
526 + " int documented,\n" |
527 "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" + |
527 + " int undocmented)</pre>", |
528 "ParamTest2</a><java.util.List<? extends " + |
528 // CONSTRUCTOR PARAMS |
529 "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" + |
529 "<pre>public AnnotationTypeUsage(<a " |
530 "Foo4</a>>>></span></code> </td>" |
530 + "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" |
531 }, |
531 + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" |
532 { "pkg2/class-use/ParamTest2.html", |
532 + "optional</a>=\"Constructor Param Annotation\",<a " |
533 "<caption><span>Methods in <a href=\"../../pkg2/" + |
533 + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n" |
534 "package-summary.html\">pkg2</a> with type parameters of " + |
534 + " int documented,\n" |
535 "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class " + |
535 + " int undocmented)</pre>"); |
536 "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">" + |
536 |
537 " </span></caption>" |
537 //================================= |
538 }, |
538 // Annotatation Type Usage |
539 { "pkg2/class-use/ParamTest2.html", |
539 //================================= |
540 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3" + |
540 checkOutput("pkg/class-use/AnnotationType.html", true, |
541 ".</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." + |
541 "<caption><span>Packages with annotations of type <a href=\"" |
542 "html#method-T-\">method</a></span>(T t)</code> </td>" |
542 + "../../pkg/AnnotationType.html\" title=\"annotation in pkg\">" |
543 }, |
543 + "AnnotationType</a></span><span class=\"tabEnd\"> " |
544 { "pkg2/class-use/ParamTest2.html", |
544 + "</span></caption>", |
545 "<td class=\"colFirst\"><code><T extends <a href=\"../" + |
545 "<caption><span>Classes in <a href=\"../../pkg/" |
546 "../pkg2/ParamTest2.html\" title=\"class in pkg2\">" + |
546 + "package-summary.html\">pkg</a> with annotations of type " |
547 "ParamTest2</a><java.util.List<? extends <a href=\".." + |
547 + "<a href=\"../../pkg/AnnotationType.html\" title=\"" |
548 "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>>" + |
548 + "annotation in pkg\">AnnotationType</a></span><span class" |
549 ">><br><a href=\"../../pkg2/ParamTest2.html\" " + |
549 + "=\"tabEnd\"> </span></caption>", |
550 "title=\"class in pkg2\">ParamTest2</a><java.util.List" + |
550 "<caption><span>Fields in <a href=\"../../pkg/" |
551 "<? extends <a href=\"../../pkg2/Foo4.html\" title=\"" + |
551 + "package-summary.html\">pkg</a> with annotations of type " |
552 "class in pkg2\">Foo4</a>>></code></td>" |
552 + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " |
553 }, |
553 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" |
554 |
554 + " </span></caption>", |
555 { "pkg2/class-use/Foo4.html", |
555 "<caption><span>Methods in <a href=\"../../pkg/" |
556 "<caption><span>Classes in <a href=\"../../pkg2/" + |
556 + "package-summary.html\">pkg</a> with annotations of type " |
557 "package-summary.html\">pkg2</a> with type parameters of " + |
557 + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " |
558 "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " + |
558 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" |
559 "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " + |
559 + " </span></caption>", |
560 "</span></caption>" |
560 "<caption><span>Method parameters in <a href=\"../../pkg/" |
561 }, |
561 + "package-summary.html\">pkg</a> with annotations of type " |
562 { "pkg2/class-use/Foo4.html", |
562 + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " |
563 "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" " + |
563 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" |
564 "title=\"class in pkg2\">ClassUseTest3</a><T extends " + |
564 + " </span></caption>", |
565 "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">" + |
565 "<caption><span>Constructors in <a href=\"../../pkg/" |
566 "ParamTest2</a><java.util.List<? extends " + |
566 + "package-summary.html\">pkg</a> with annotations of type " |
567 "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">" + |
567 + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " |
568 "Foo4</a>>>></span></code> </td>" |
568 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" |
569 }, |
569 + " </span></caption>", |
570 { "pkg2/class-use/Foo4.html", |
570 "<caption><span>Constructor parameters in <a href=\"../../" |
571 "<caption><span>Methods in <a href=\"../../pkg2/" + |
571 + "pkg/package-summary.html\">pkg</a> with annotations of " |
572 "package-summary.html\">pkg2</a> with type parameters of " + |
572 + "type <a href=\"../../pkg/AnnotationType.html\" title=\"" |
573 "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " + |
573 + "annotation in pkg\">AnnotationType</a></span><span class=\"" |
574 "pkg2\">Foo4</a></span><span class=\"tabEnd\"> </span></caption>" |
574 + "tabEnd\"> </span></caption>" |
575 }, |
575 ); |
576 { "pkg2/class-use/Foo4.html", |
|
577 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." + |
|
578 "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." + |
|
579 "html#method-T-\">method</a></span>(T t)</code>" + |
|
580 " </td>" |
|
581 }, |
|
582 { "pkg2/class-use/Foo4.html", |
|
583 "<caption><span>Methods in <a href=\"../../pkg2/" + |
|
584 "package-summary.html\">pkg2</a> that return types with " + |
|
585 "arguments of type <a href=\"../../pkg2/Foo4.html\" " + |
|
586 "title=\"class in pkg2\">Foo4</a></span><span class=\"" + |
|
587 "tabEnd\"> </span></caption>" |
|
588 }, |
|
589 { "pkg2/class-use/Foo4.html", |
|
590 "<td class=\"colFirst\"><code><T extends <a href=\"../" + |
|
591 "../pkg2/ParamTest2.html\" title=\"class in pkg2\">" + |
|
592 "ParamTest2</a><java.util.List<? extends <a href=\".." + |
|
593 "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>>" + |
|
594 ">><br><a href=\"../../pkg2/ParamTest2.html\" " + |
|
595 "title=\"class in pkg2\">ParamTest2</a><java.util.List" + |
|
596 "<? extends <a href=\"../../pkg2/Foo4.html\" title=\"" + |
|
597 "class in pkg2\">Foo4</a>>></code></td>" |
|
598 }, |
|
599 |
|
600 //Type parameters in constructor and method args |
|
601 { "pkg2/class-use/Foo4.html", |
|
602 "<caption><span>Method parameters in <a href=\"../../pkg2/" + |
|
603 "package-summary.html\">pkg2</a> with type arguments of " + |
|
604 "type <a href=\"../../pkg2/Foo4.html\" title=\"class in " + |
|
605 "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " + |
|
606 "</span></caption>\n" + |
|
607 "<tr>\n" + |
|
608 "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n" + |
|
609 "<th class=\"colLast\" scope=\"col\">Method and Description</th>\n" + |
|
610 "</tr>\n" + |
|
611 "<tbody>\n" + |
|
612 "<tr class=\"altColor\">\n" + |
|
613 "<td class=\"colFirst\"><code>void</code></td>\n" + |
|
614 "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3." + |
|
615 "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3." + |
|
616 "html#method-java.util.Set-\">method</a></span>(java." + |
|
617 "util.Set<<a href=\"../../pkg2/Foo4.html\" title=\"" + |
|
618 "class in pkg2\">Foo4</a>> p)</code> </td>\n" + |
|
619 "</tr>\n" + |
|
620 "</tbody>" |
|
621 }, |
|
622 { "pkg2/class-use/Foo4.html", |
|
623 "<caption><span>Constructor parameters in <a href=\"../../" + |
|
624 "pkg2/package-summary.html\">pkg2</a> with type arguments " + |
|
625 "of type <a href=\"../../pkg2/Foo4.html\" title=\"class in " + |
|
626 "pkg2\">Foo4</a></span><span class=\"tabEnd\"> " + |
|
627 "</span></caption>" |
|
628 }, |
|
629 |
|
630 //================================= |
|
631 // Annotatation Type Usage |
|
632 //================================= |
|
633 { "pkg/class-use/AnnotationType.html", |
|
634 "<caption><span>Packages with annotations of type <a href=\"" + |
|
635 "../../pkg/AnnotationType.html\" title=\"annotation in pkg\">" + |
|
636 "AnnotationType</a></span><span class=\"tabEnd\"> " + |
|
637 "</span></caption>" |
|
638 }, |
|
639 |
|
640 { "pkg/class-use/AnnotationType.html", |
|
641 "<caption><span>Classes in <a href=\"../../pkg/" + |
|
642 "package-summary.html\">pkg</a> with annotations of type " + |
|
643 "<a href=\"../../pkg/AnnotationType.html\" title=\"" + |
|
644 "annotation in pkg\">AnnotationType</a></span><span class" + |
|
645 "=\"tabEnd\"> </span></caption>" |
|
646 }, |
|
647 |
|
648 { "pkg/class-use/AnnotationType.html", |
|
649 "<caption><span>Fields in <a href=\"../../pkg/" + |
|
650 "package-summary.html\">pkg</a> with annotations of type " + |
|
651 "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " + |
|
652 "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" + |
|
653 " </span></caption>" |
|
654 }, |
|
655 |
|
656 { "pkg/class-use/AnnotationType.html", |
|
657 "<caption><span>Methods in <a href=\"../../pkg/" + |
|
658 "package-summary.html\">pkg</a> with annotations of type " + |
|
659 "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " + |
|
660 "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" + |
|
661 " </span></caption>" |
|
662 }, |
|
663 |
|
664 { "pkg/class-use/AnnotationType.html", |
|
665 "<caption><span>Method parameters in <a href=\"../../pkg/" + |
|
666 "package-summary.html\">pkg</a> with annotations of type " + |
|
667 "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " + |
|
668 "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" + |
|
669 " </span></caption>" |
|
670 }, |
|
671 |
|
672 { "pkg/class-use/AnnotationType.html", |
|
673 "<caption><span>Constructors in <a href=\"../../pkg/" + |
|
674 "package-summary.html\">pkg</a> with annotations of type " + |
|
675 "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation " + |
|
676 "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">" + |
|
677 " </span></caption>" |
|
678 }, |
|
679 |
|
680 { "pkg/class-use/AnnotationType.html", |
|
681 "<caption><span>Constructor parameters in <a href=\"../../" + |
|
682 "pkg/package-summary.html\">pkg</a> with annotations of " + |
|
683 "type <a href=\"../../pkg/AnnotationType.html\" title=\"" + |
|
684 "annotation in pkg\">AnnotationType</a></span><span class=\"" + |
|
685 "tabEnd\"> </span></caption>" |
|
686 }, |
|
687 |
|
688 //================================= |
|
689 // TYPE PARAMETER IN INDEX |
|
690 //================================= |
|
691 { "index-all.html", |
|
692 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" + |
|
693 "method(Vector<Object>)</a></span>" |
|
694 }, |
|
695 //================================= |
|
696 // TYPE PARAMETER IN INDEX |
|
697 //================================= |
|
698 { "index-all.html", |
|
699 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" + |
|
700 "method(Vector<Object>)</a></span>" |
|
701 }, |
|
702 }; |
|
703 private static final String[][] NEGATED_TEST = { |
|
704 //================================= |
|
705 // ENUM TESTING |
|
706 //================================= |
|
707 //NO constructor section |
|
708 { "pkg/Coin.html", "<h3>Constructor Summary</h3>"}, |
|
709 //================================= |
|
710 // TYPE PARAMETER TESTING |
|
711 //================================= |
|
712 //No type parameters in class frame. |
|
713 { "allclasses-frame.html", |
|
714 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + |
|
715 "TypeParameters</a><<a href=\"../pkg/TypeParameters.html\" " + |
|
716 "title=\"type parameter in TypeParameters\">E</a>>" |
|
717 }, |
|
718 |
576 |
719 //============================================================== |
577 //============================================================== |
720 // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted) |
578 // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted) |
721 //=============================================================== |
579 //=============================================================== |
722 |
580 checkOutput("pkg/AnnotationTypeUsage.html", false, |
723 //CLASS |
581 // CLASS |
724 { "pkg/AnnotationTypeUsage.html", |
582 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n" |
725 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n" + |
583 + " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" |
726 " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" + |
584 + "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>", |
727 "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>"}, |
585 // FIELD |
728 |
586 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n" |
729 //FIELD |
587 + " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" |
730 { "pkg/AnnotationTypeUsage.html", |
588 + "public int <span class=\"memberNameLabel\">field</span>", |
731 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n" + |
589 // CONSTRUCTOR |
732 " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" + |
590 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n" |
733 "public int <span class=\"memberNameLabel\">field</span>"}, |
591 + " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" |
734 |
592 + "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()", |
735 //CONSTRUCTOR |
593 // METHOD |
736 { "pkg/AnnotationTypeUsage.html", |
594 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n" |
737 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n" + |
595 + " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" |
738 " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" + |
596 + "public void <span class=\"memberNameLabel\">method</span>()"); |
739 "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()"}, |
|
740 |
|
741 //METHOD |
|
742 { "pkg/AnnotationTypeUsage.html", |
|
743 "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n" + |
|
744 " <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n" + |
|
745 "public void <span class=\"memberNameLabel\">method</span>()"}, |
|
746 |
597 |
747 //================================= |
598 //================================= |
748 // Make sure annotation types do not |
599 // Make sure annotation types do not |
749 // trigger this warning. |
600 // trigger this warning. |
750 //================================= |
601 //================================= |
751 {WARNING_OUTPUT, |
602 checkOutput(Output.WARNING, false, |
752 "Internal error: package sets don't match: [] with: null" |
603 "Internal error: package sets don't match: [] with: null"); |
753 }, |
604 |
754 }; |
605 //================================= |
755 |
606 // ANNOTATION TYPE USAGE TESTING (All Different Types). |
756 /** |
607 //================================= |
757 * The entry point of the test. |
608 checkOutput("pkg1/B.html", true, |
758 * @param args the array of command line arguments. |
609 // Integer |
759 */ |
610 "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,", |
760 public static void main(String[] args) { |
611 // Double |
761 TestNewLanguageFeatures tester = new TestNewLanguageFeatures(); |
612 "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,", |
762 tester.run(ARGS, TEST, NEGATED_TEST); |
613 // Boolean |
763 tester.printSummary(); |
614 "<a href=\"../pkg1/A.html#b--\">b</a>=true,", |
|
615 // String |
|
616 "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\",", |
|
617 // Class |
|
618 "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,", |
|
619 // Bounded Class |
|
620 "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,", |
|
621 // Enum |
|
622 "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,", |
|
623 // Annotation Type |
|
624 "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),", |
|
625 // String Array |
|
626 "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},", |
|
627 // Primitive |
|
628 "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,"); |
|
629 |
|
630 // XXX: Add array test case after this if fixed: |
|
631 //5020899: Incorrect internal representation of class-valued annotation elements |
|
632 // Make sure that annotations are surrounded by <pre> and </pre> |
|
633 checkOutput("pkg1/B.html", true, |
|
634 "<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>", |
|
635 "public interface <span class=\"typeNameLabel\">B</span></pre>"); |
|
636 |
764 } |
637 } |
|
638 |
765 } |
639 } |