test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java

Tue, 15 Oct 2013 15:57:13 -0700

author
jjg
date
Tue, 15 Oct 2013 15:57:13 -0700
changeset 2134
b0c086cd4520
parent 2101
933ba3f81a87
child 2147
130b8c0e570e
permissions
-rw-r--r--

8026564: import changes from type-annotations forest
Reviewed-by: jjg
Contributed-by: wdietl@gmail.com, steve.sides@oracle.com

bpatel@1686 1 /*
bpatel@1686 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
bpatel@1686 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bpatel@1686 4 *
bpatel@1686 5 * This code is free software; you can redistribute it and/or modify it
bpatel@1686 6 * under the terms of the GNU General Public License version 2 only, as
bpatel@1686 7 * published by the Free Software Foundation.
bpatel@1686 8 *
bpatel@1686 9 * This code is distributed in the hope that it will be useful, but WITHOUT
bpatel@1686 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bpatel@1686 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
bpatel@1686 12 * version 2 for more details (a copy is included in the LICENSE file that
bpatel@1686 13 * accompanied this code).
bpatel@1686 14 *
bpatel@1686 15 * You should have received a copy of the GNU General Public License version
bpatel@1686 16 * 2 along with this work; if not, write to the Free Software Foundation,
bpatel@1686 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bpatel@1686 18 *
bpatel@1686 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bpatel@1686 20 * or visit www.oracle.com if you need additional information or have any
bpatel@1686 21 * questions.
bpatel@1686 22 */
bpatel@1686 23
bpatel@1686 24 /*
bpatel@1686 25 * @test
bpatel@2101 26 * @bug 8005091 8009686 8025633
bpatel@1686 27 * @summary Make sure that type annotations are displayed correctly
bpatel@1686 28 * @author Bhavesh Patel
bpatel@1686 29 * @library ../lib/
jjg@2134 30 * @ignore
bpatel@1686 31 * @build JavadocTester TestTypeAnnotations
bpatel@1686 32 * @run main TestTypeAnnotations
bpatel@1686 33 */
bpatel@1686 34
bpatel@1686 35 public class TestTypeAnnotations extends JavadocTester {
bpatel@1686 36
bpatel@1686 37 //Test information.
bpatel@1691 38 private static final String BUG_ID = "8005091-8009686";
bpatel@1686 39
bpatel@1686 40 //Javadoc arguments.
bpatel@1686 41 private static final String[] ARGS = new String[] {
bpatel@1686 42 "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "typeannos"
bpatel@1686 43 };
bpatel@1686 44
bpatel@1686 45 //Input for string search tests.
bpatel@1686 46 private static final String[][] NEGATED_TEST = NO_TEST;
bpatel@1686 47 private static final String[][] TEST = {
bpatel@1686 48 // Test for type annotations on Class Extends (ClassExtends.java).
bpatel@1691 49 {BUG_ID + FS + "typeannos" + FS + "MyClass.html",
bpatel@1691 50 "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " +
bpatel@1691 51 "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" " +
bpatel@1691 52 "title=\"class in typeannos\">ParameterizedClass</a>&lt;<a href=\"" +
bpatel@1691 53 "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">" +
bpatel@1691 54 "@ClassExtB</a> java.lang.String&gt;"
bpatel@1691 55 },
bpatel@1686 56 {BUG_ID + FS + "typeannos" + FS + "MyClass.html",
bpatel@1686 57 "implements <a href=\"../typeannos/ClassExtB.html\" title=\"" +
bpatel@1686 58 "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, " +
bpatel@1691 59 "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in " +
bpatel@1691 60 "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" " +
bpatel@1691 61 "title=\"interface in typeannos\">ParameterizedInterface</a>&lt;" +
bpatel@1691 62 "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " +
bpatel@1691 63 "typeannos\">@ClassExtB</a> java.lang.String&gt;</pre>"
bpatel@1686 64 },
bpatel@1686 65 {BUG_ID + FS + "typeannos" + FS + "MyInterface.html",
bpatel@1691 66 "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " +
bpatel@1691 67 "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/" +
bpatel@1691 68 "ParameterizedInterface.html\" title=\"interface in typeannos\">" +
bpatel@1691 69 "ParameterizedInterface</a>&lt;<a href=\"../typeannos/ClassExtA.html\" " +
bpatel@1691 70 "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String&gt;, " +
bpatel@1691 71 "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " +
bpatel@1691 72 "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>"
bpatel@1686 73 },
bpatel@1686 74
bpatel@1686 75 // Test for type annotations on Class Parameters (ClassParameters.java).
bpatel@1686 76 {BUG_ID + FS + "typeannos" + FS + "ExtendsBound.html",
bpatel@1686 77 "class <span class=\"strong\">ExtendsBound&lt;K extends <a " +
bpatel@1686 78 "href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
bpatel@1686 79 "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>"
bpatel@1686 80 },
bpatel@1691 81 {BUG_ID + FS + "typeannos" + FS + "ExtendsGeneric.html",
bpatel@1858 82 "<pre>class <span class=\"strong\">ExtendsGeneric&lt;K extends " +
bpatel@1691 83 "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
bpatel@1691 84 "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" " +
bpatel@1691 85 "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\"" +
bpatel@1691 86 "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">" +
bpatel@1691 87 "@ClassParamB</a> java.lang.String&gt;&gt;</span>"
bpatel@1691 88 },
bpatel@1686 89 {BUG_ID + FS + "typeannos" + FS + "TwoBounds.html",
bpatel@1858 90 "<pre>class <span class=\"strong\">TwoBounds&lt;K extends <a href=\"" +
bpatel@1686 91 "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
bpatel@1691 92 "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/" +
bpatel@1691 93 "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB" +
bpatel@1686 94 "</a> java.lang.String&gt;</span>"
bpatel@1686 95 },
bpatel@1686 96 {BUG_ID + FS + "typeannos" + FS + "Complex1.html",
bpatel@1686 97 "class <span class=\"strong\">Complex1&lt;K extends <a href=\"../" +
bpatel@1686 98 "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
jjg@1736 99 "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>"
bpatel@1686 100 },
bpatel@1686 101 {BUG_ID + FS + "typeannos" + FS + "Complex2.html",
bpatel@1686 102 "class <span class=\"strong\">Complex2&lt;K extends java.lang." +
jjg@1736 103 "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\"" +
bpatel@1686 104 "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>"
bpatel@1686 105 },
bpatel@1686 106 {BUG_ID + FS + "typeannos" + FS + "ComplexBoth.html",
bpatel@1686 107 "class <span class=\"strong\">ComplexBoth&lt;K extends <a href=\"" +
bpatel@1686 108 "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\"" +
jjg@1736 109 ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/" +
bpatel@1686 110 "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA" +
bpatel@1686 111 "</a> java.lang.Runnable&gt;</span>"
bpatel@1686 112 },
bpatel@1686 113
bpatel@1691 114 // Test for type annotations on fields (Fields.java).
bpatel@1691 115 {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html",
bpatel@1691 116 "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in " +
bpatel@1691 117 "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" " +
bpatel@1691 118 "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " +
bpatel@1691 119 "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" +
bpatel@1691 120 "@FldB</a> java.lang.String&gt; bothTypeArgs</pre>"
bpatel@1691 121 },
bpatel@1691 122 {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html",
bpatel@1691 123 "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in " +
bpatel@1691 124 "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/" +
bpatel@1691 125 "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] " +
bpatel@1691 126 "array1Deep</pre>"
bpatel@1691 127 },
bpatel@1691 128 {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html",
bpatel@1691 129 "<pre>java.lang.String[] <a href=\"../typeannos/FldB.html\" " +
bpatel@1691 130 "title=\"annotation in typeannos\">@FldB</a> [] array2SecondOld</pre>"
bpatel@1691 131 },
bpatel@1691 132 {BUG_ID + FS + "typeannos" + FS + "DefaultScope.html",
bpatel@1691 133 "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in " +
bpatel@1691 134 "typeannos\">@FldD</a> java.lang.String <a href=\"../typeannos/" +
bpatel@1691 135 "FldC.html\" title=\"annotation in typeannos\">@FldC</a> <a href=\"" +
bpatel@1691 136 "../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA" +
bpatel@1691 137 "</a> [] <a href=\"../typeannos/FldC.html\" title=\"annotation in " +
bpatel@1691 138 "typeannos\">@FldC</a> <a href=\"../typeannos/FldB.html\" title=\"" +
bpatel@1691 139 "annotation in typeannos\">@FldB</a> [] array2Deep</pre>"
bpatel@1691 140 },
bpatel@1691 141 {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html",
bpatel@1691 142 "<pre>public final&nbsp;<a href=\"../typeannos/Parameterized.html\" " +
bpatel@1691 143 "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\"../" +
bpatel@1691 144 "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> " +
bpatel@1691 145 "<a href=\"../typeannos/Parameterized.html\" title=\"class in " +
bpatel@1691 146 "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" " +
bpatel@1691 147 "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " +
bpatel@1691 148 "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" +
bpatel@1691 149 "@FldB</a> java.lang.String&gt;,<a href=\"../typeannos/FldB.html\" " +
bpatel@1691 150 "title=\"annotation in typeannos\">@FldB</a> java.lang.String&gt; " +
bpatel@1691 151 "nestedParameterized</pre>"
bpatel@1691 152 },
bpatel@1691 153 {BUG_ID + FS + "typeannos" + FS + "ModifiedScoped.html",
bpatel@1691 154 "<pre>public final&nbsp;<a href=\"../typeannos/FldA.html\" " +
bpatel@1691 155 "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] " +
bpatel@1691 156 "array2</pre>"
bpatel@1691 157 },
bpatel@1691 158
bpatel@1686 159 // Test for type annotations on method return types (MethodReturnType.java).
bpatel@1686 160 {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html",
bpatel@1686 161 "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"../typeannos/MRtnA.html\" " +
bpatel@1686 162 "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String" +
bpatel@1686 163 "&nbsp;method()</pre>"
bpatel@1686 164 },
bpatel@1691 165 {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html",
bpatel@1691 166 "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " +
bpatel@1691 167 "typeannos\">@MRtnA</a> java.lang.String <a href=\"../typeannos/" +
bpatel@1691 168 "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> [] <a " +
bpatel@1691 169 "href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">" +
bpatel@1691 170 "@MRtnB</a> []&nbsp;array2Deep()</pre>"
bpatel@1691 171 },
bpatel@1691 172 {BUG_ID + FS + "typeannos" + FS + "MtdDefaultScope.html",
bpatel@1691 173 "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " +
bpatel@1691 174 "typeannos\">@MRtnA</a> java.lang.String[][]&nbsp;array2()</pre>"
bpatel@1691 175 },
bpatel@1691 176 {BUG_ID + FS + "typeannos" + FS + "MtdModifiedScoped.html",
bpatel@1691 177 "<pre>public final&nbsp;<a href=\"../typeannos/MtdParameterized.html\" " +
bpatel@1691 178 "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\"../" +
bpatel@1691 179 "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> " +
bpatel@1691 180 "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in " +
bpatel@1691 181 "typeannos\">MtdParameterized</a>&lt;<a href=\"../typeannos/MRtnA." +
bpatel@1691 182 "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang." +
bpatel@1691 183 "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in " +
bpatel@1691 184 "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\"../typeannos/" +
bpatel@1691 185 "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java." +
bpatel@1691 186 "lang.String&gt;&nbsp;nestedMtdParameterized()</pre>"
bpatel@1691 187 },
bpatel@1686 188
bpatel@1686 189 // Test for type annotations on method type parameters (MethodTypeParameters.java).
bpatel@1686 190 {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html",
bpatel@1686 191 "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" +
bpatel@1686 192 "annotation in typeannos\">@MTyParamA</a> java.lang.String&gt;" +
bpatel@1686 193 "&nbsp;void&nbsp;methodExtends()</pre>"
bpatel@1686 194 },
bpatel@1691 195 {BUG_ID + FS + "typeannos" + FS + "UnscopedUnmodified.html",
bpatel@1691 196 "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" +
bpatel@1691 197 "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/" +
bpatel@1691 198 "MtdTyParameterized.html\" title=\"class in typeannos\">" +
bpatel@1691 199 "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" " +
bpatel@1691 200 "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" +
bpatel@1691 201 "&gt;&gt;&nbsp;void&nbsp;nestedExtends()</pre>"
bpatel@1691 202 },
bpatel@1686 203 {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html",
bpatel@1686 204 "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/" +
bpatel@1686 205 "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " +
bpatel@1686 206 "java.lang.String&gt;&nbsp;void&nbsp;methodExtends()</pre>"
bpatel@1686 207 },
bpatel@1691 208 {BUG_ID + FS + "typeannos" + FS + "PublicModifiedMethods.html",
bpatel@1691 209 "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/" +
bpatel@1691 210 "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " +
bpatel@1691 211 "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" " +
bpatel@1691 212 "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../" +
bpatel@1691 213 "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">" +
bpatel@1691 214 "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" " +
bpatel@1691 215 "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" +
bpatel@1691 216 "&gt;&gt;&nbsp;void&nbsp;dual()</pre>"
bpatel@1691 217 },
bpatel@1691 218
bpatel@1691 219 // Test for type annotations on parameters (Parameters.java).
bpatel@1691 220 {BUG_ID + FS + "typeannos" + FS + "Parameters.html",
bpatel@1691 221 "<pre>void&nbsp;unannotated(<a href=\"../typeannos/" +
bpatel@1691 222 "ParaParameterized.html\" title=\"class in typeannos\">" +
bpatel@1691 223 "ParaParameterized</a>&lt;java.lang.String,java.lang.String&gt;" +
bpatel@1691 224 "&nbsp;a)</pre>"
bpatel@1691 225 },
bpatel@1691 226 {BUG_ID + FS + "typeannos" + FS + "Parameters.html",
bpatel@1691 227 "<pre>void&nbsp;nestedParaParameterized(<a href=\"../typeannos/" +
bpatel@1691 228 "ParaParameterized.html\" title=\"class in typeannos\">" +
bpatel@1691 229 "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" " +
bpatel@1691 230 "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../" +
bpatel@1691 231 "typeannos/ParaParameterized.html\" title=\"class in typeannos\">" +
bpatel@1691 232 "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" " +
bpatel@1691 233 "title=\"annotation in typeannos\">@ParamA</a> java.lang.String," +
bpatel@1691 234 "<a href=\"../typeannos/ParamB.html\" title=\"annotation in " +
bpatel@1691 235 "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\"../" +
bpatel@1691 236 "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB" +
bpatel@1691 237 "</a> java.lang.String&gt;&nbsp;a)</pre>"
bpatel@1691 238 },
bpatel@1691 239 {BUG_ID + FS + "typeannos" + FS + "Parameters.html",
bpatel@1691 240 "<pre>void&nbsp;array2Deep(<a href=\"../typeannos/ParamA.html\" " +
bpatel@1691 241 "title=\"annotation in typeannos\">@ParamA</a> java.lang.String " +
bpatel@1691 242 "<a href=\"../typeannos/ParamA.html\" title=\"annotation in " +
bpatel@1691 243 "typeannos\">@ParamA</a> [] <a href=\"../typeannos/ParamB.html\" " +
bpatel@1691 244 "title=\"annotation in typeannos\">@ParamB</a> []&nbsp;a)</pre>"
bpatel@1691 245 },
bpatel@1686 246
bpatel@1686 247 // Test for type annotations on throws (Throws.java).
bpatel@1686 248 {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html",
bpatel@1686 249 "<pre>void&nbsp;oneException()" + NL +
jjg@1741 250 " throws <a href=\"../typeannos/ThrA.html\" title=\"" +
bpatel@1686 251 "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
bpatel@1686 252 },
bpatel@1686 253 {BUG_ID + FS + "typeannos" + FS + "ThrDefaultUnmodified.html",
bpatel@1686 254 "<pre>void&nbsp;twoExceptions()" + NL +
jjg@1741 255 " throws <a href=\"../typeannos/ThrA.html\" title=\"" +
bpatel@1686 256 "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL +
jjg@1741 257 " <a href=\"../typeannos/ThrA.html\" title=\"" +
bpatel@1686 258 "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
bpatel@1686 259 },
bpatel@1686 260 {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html",
bpatel@1686 261 "<pre>public final&nbsp;void&nbsp;oneException(java.lang.String&nbsp;a)" + NL +
bpatel@1686 262 " throws <a href=\"../typeannos/ThrA.html\" " +
bpatel@1686 263 "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
bpatel@1686 264 },
bpatel@1686 265 {BUG_ID + FS + "typeannos" + FS + "ThrPublicModified.html",
bpatel@1686 266 "<pre>public final&nbsp;void&nbsp;twoExceptions(java.lang.String&nbsp;a)" + NL +
bpatel@1686 267 " throws <a href=\"../typeannos/ThrA.html\" " +
bpatel@1686 268 "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException," + NL +
bpatel@1686 269 " <a href=\"../typeannos/ThrA.html\" " +
bpatel@1686 270 "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
bpatel@1686 271 },
bpatel@1686 272 {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html",
bpatel@1686 273 "<pre>void&nbsp;oneException()" + NL +
jjg@1741 274 " throws <a href=\"../typeannos/ThrB.html\" title=\"" +
bpatel@1686 275 "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
bpatel@2101 276 "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>"
bpatel@1686 277 },
bpatel@1686 278 {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html",
bpatel@1686 279 "<pre>void&nbsp;twoExceptions()" + NL +
jjg@1741 280 " throws <a href=\"../typeannos/ThrB.html\" title=\"" +
bpatel@1686 281 "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
bpatel@2101 282 "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException," + NL +
jjg@1741 283 " <a href=\"../typeannos/ThrA.html\" title=\"" +
bpatel@1686 284 "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
bpatel@1686 285 },
bpatel@1686 286
bpatel@1691 287 // Test for type annotations on type parameters (TypeParameters.java).
bpatel@1691 288 {BUG_ID + FS + "typeannos" + FS + "TestMethods.html",
bpatel@1691 289 "<pre>&lt;K,V extends <a href=\"../typeannos/TyParaA.html\" title=\"" +
bpatel@1691 290 "annotation in typeannos\">@TyParaA</a> java.lang.String&gt;&nbsp;" +
bpatel@1691 291 "void&nbsp;secondAnnotated()</pre>"
bpatel@1691 292 },
bpatel@1691 293
bpatel@1686 294 // Test for type annotations on wildcard type (Wildcards.java).
bpatel@1686 295 {BUG_ID + FS + "typeannos" + FS + "BoundTest.html",
bpatel@1686 296 "<pre>void&nbsp;wcExtends(<a href=\"../typeannos/MyList.html\" " +
bpatel@1686 297 "title=\"class in typeannos\">MyList</a>&lt;? extends <a href=\"" +
bpatel@1686 298 "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA" +
bpatel@1686 299 "</a> java.lang.String&gt;&nbsp;l)</pre>"
bpatel@1686 300 },
bpatel@1686 301 {BUG_ID + FS + "typeannos" + FS + "BoundTest.html",
bpatel@1686 302 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
bpatel@1686 303 "typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/WldA.html\" " +
bpatel@1686 304 "title=\"annotation in typeannos\">@WldA</a> java.lang.String&gt;" +
bpatel@1686 305 "&nbsp;returnWcSuper()</pre>"
bpatel@1686 306 },
bpatel@1686 307 {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
bpatel@1686 308 "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" +
bpatel@1686 309 "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/" +
bpatel@1686 310 "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" +
bpatel@2101 311 "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." +
bpatel@1686 312 "String&gt;&nbsp;l)</pre>"
bpatel@1686 313 },
bpatel@1686 314 {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
bpatel@1686 315 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
bpatel@1686 316 "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB." +
bpatel@1686 317 "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" +
bpatel@2101 318 "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" +
bpatel@1686 319 "&gt;&nbsp;returnWcExtends()</pre>"
bpatel@1686 320 },
bpatel@1686 321
bpatel@1686 322 // Test for receiver annotations (Receivers.java).
bpatel@1686 323 {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
bpatel@1686 324 "<pre>void&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" " +
bpatel@1686 325 "title=\"annotation in typeannos\">@RcvrA</a>&nbsp;" +
jjg@1741 326 "DefaultUnmodified&nbsp;this)" + NL + " throws java." +
bpatel@1686 327 "lang.Exception</pre>"
bpatel@1686 328 },
bpatel@1686 329 {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
bpatel@1686 330 "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA." +
bpatel@1686 331 "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" +
bpatel@1686 332 "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" +
bpatel@2101 333 "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" +
bpatel@1686 334 "&nbsp;DefaultUnmodified&nbsp;this)</pre>"
bpatel@1686 335 },
bpatel@1686 336 {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
bpatel@1686 337 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
bpatel@1686 338 "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " +
bpatel@1686 339 "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this," + NL +
jjg@1741 340 " T&nbsp;r)" + NL +
jjg@1741 341 " throws java.lang.Exception</pre>"
bpatel@1686 342 },
bpatel@1686 343 {BUG_ID + FS + "typeannos" + FS + "PublicModified.html",
bpatel@1686 344 "<pre>public final&nbsp;java.lang.String&nbsp;nonVoid(<a href=\"" +
bpatel@1686 345 "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">" +
bpatel@1686 346 "@RcvrA</a>&nbsp;PublicModified&nbsp;this)</pre>"
bpatel@1686 347 },
bpatel@1686 348 {BUG_ID + FS + "typeannos" + FS + "PublicModified.html",
bpatel@1686 349 "<pre>public final&nbsp;&lt;T extends java.lang.Runnable&gt;&nbsp;" +
bpatel@1686 350 "void&nbsp;accept(<a href=\"../typeannos/RcvrA.html\" title=\"" +
bpatel@1686 351 "annotation in typeannos\">@RcvrA</a>&nbsp;PublicModified&nbsp;this," + NL +
jjg@1741 352 " T&nbsp;r)" + NL +
jjg@1741 353 " throws java.lang.Exception</pre>"
bpatel@1686 354 },
bpatel@1686 355 {BUG_ID + FS + "typeannos" + FS + "WithValue.html",
bpatel@1686 356 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
bpatel@1686 357 "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " +
bpatel@2101 358 "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" +
bpatel@1686 359 "value</a>=\"m\")&nbsp;WithValue&nbsp;this," + NL +
jjg@1741 360 " T&nbsp;r)" + NL +
jjg@1741 361 " throws java.lang.Exception</pre>"
bpatel@1686 362 },
bpatel@1686 363 {BUG_ID + FS + "typeannos" + FS + "WithFinal.html",
bpatel@1686 364 "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB." +
bpatel@1686 365 "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" +
bpatel@2101 366 "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal" +
bpatel@1686 367 "&nbsp;this)</pre>"
bpatel@1686 368 },
bpatel@1686 369 {BUG_ID + FS + "typeannos" + FS + "WithBody.html",
bpatel@1686 370 "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\"" +
bpatel@1686 371 "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>"
bpatel@1686 372 },
bpatel@1686 373 {BUG_ID + FS + "typeannos" + FS + "Generic2.html",
bpatel@1686 374 "<pre>void&nbsp;test2(<a href=\"../typeannos/RcvrA.html\" title=\"" +
bpatel@1686 375 "annotation in typeannos\">@RcvrA</a>&nbsp;Generic2&lt;X&gt;&nbsp;this)</pre>"
bpatel@1686 376 }
bpatel@1686 377 };
bpatel@1686 378
bpatel@1686 379 /**
bpatel@1686 380 * The entry point of the test.
bpatel@1686 381 * @param args the array of command line arguments.
bpatel@1686 382 */
bpatel@1686 383 public static void main(String[] args) {
bpatel@1686 384 TestTypeAnnotations tester = new TestTypeAnnotations();
bpatel@1686 385 run(tester, ARGS, TEST, NEGATED_TEST);
bpatel@1686 386 tester.printSummary();
bpatel@1686 387 }
bpatel@1686 388
bpatel@1686 389 /**
bpatel@1686 390 * {@inheritDoc}
bpatel@1686 391 */
bpatel@1686 392 public String getBugId() {
bpatel@1686 393 return BUG_ID;
bpatel@1686 394 }
bpatel@1686 395
bpatel@1686 396 /**
bpatel@1686 397 * {@inheritDoc}
bpatel@1686 398 */
bpatel@1686 399 public String getBugName() {
bpatel@1686 400 return getClass().getName();
bpatel@1686 401 }
bpatel@1686 402 }

mercurial