langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java
changeset 24399 af1a0220d0fa
parent 24072 e7549dcbc4af
child 26532 aa84b6606229
equal deleted inserted replaced
24398:601a611d0aee 24399:af1a0220d0fa
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug      8005091 8009686 8025633 8026567
    26  * @bug      8005091 8009686 8025633 8026567
    27  * @summary  Make sure that type annotations are displayed correctly
    27  * @summary  Make sure that type annotations are displayed correctly
    28  * @author   Bhavesh Patel
    28  * @author   Bhavesh Patel
    29  * @library  ../lib/
    29  * @library  ../lib
    30  * @ignore
    30  * @ignore
    31  * @build    JavadocTester TestTypeAnnotations
    31  * @build    JavadocTester
    32  * @run main TestTypeAnnotations
    32  * @run main TestTypeAnnotations
    33  */
    33  */
    34 
    34 
    35 public class TestTypeAnnotations extends JavadocTester {
    35 public class TestTypeAnnotations extends JavadocTester {
    36 
    36 
    37     //Javadoc arguments.
    37     public static void main(String... args) throws Exception {
    38     private static final String[] ARGS = new String[] {
    38         TestTypeAnnotations tester = new TestTypeAnnotations();
    39         "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-private", "typeannos"
    39         tester.runTests();
    40     };
    40     }
    41 
    41 
    42     //Input for string search tests.
    42     @Test
    43     private static final String[][] TEST = {
    43     void test() {
       
    44         javadoc("-d", "out",
       
    45                 "-sourcepath", testSrc,
       
    46                 "-private",
       
    47                 "typeannos");
       
    48         checkExit(Exit.OK);
       
    49 
    44         // Test for type annotations on Class Extends (ClassExtends.java).
    50         // Test for type annotations on Class Extends (ClassExtends.java).
    45         { "typeannos/MyClass.html",
    51         checkOutput("typeannos/MyClass.html", true,
    46             "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " +
    52                 "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
    47             "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" " +
    53                 + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" "
    48             "title=\"class in typeannos\">ParameterizedClass</a>&lt;<a href=\"" +
    54                 + "title=\"class in typeannos\">ParameterizedClass</a>&lt;<a href=\""
    49             "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">" +
    55                 + "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">"
    50             "@ClassExtB</a> java.lang.String&gt;"
    56                 + "@ClassExtB</a> java.lang.String&gt;",
    51         },
    57 
    52         { "typeannos/MyClass.html",
    58                 "implements <a href=\"../typeannos/ClassExtB.html\" title=\""
    53             "implements <a href=\"../typeannos/ClassExtB.html\" title=\"" +
    59                 + "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, "
    54             "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, " +
    60                 + "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in "
    55             "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in " +
    61                 + "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" "
    56             "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" " +
    62                 + "title=\"interface in typeannos\">ParameterizedInterface</a>&lt;"
    57             "title=\"interface in typeannos\">ParameterizedInterface</a>&lt;" +
    63                 + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
    58             "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " +
    64                 + "typeannos\">@ClassExtB</a> java.lang.String&gt;</pre>");
    59             "typeannos\">@ClassExtB</a> java.lang.String&gt;</pre>"
    65 
    60         },
    66         checkOutput("typeannos/MyInterface.html", true,
    61         { "typeannos/MyInterface.html",
    67                 "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
    62             "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation " +
    68                 + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/"
    63             "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/" +
    69                 + "ParameterizedInterface.html\" title=\"interface in typeannos\">"
    64             "ParameterizedInterface.html\" title=\"interface in typeannos\">" +
    70                 + "ParameterizedInterface</a>&lt;<a href=\"../typeannos/ClassExtA.html\" "
    65             "ParameterizedInterface</a>&lt;<a href=\"../typeannos/ClassExtA.html\" " +
    71                 + "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String&gt;, "
    66             "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String&gt;, " +
    72                 + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
    67             "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in " +
    73                 + "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>");
    68             "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>"
       
    69         },
       
    70 
    74 
    71         // Test for type annotations on Class Parameters (ClassParameters.java).
    75         // Test for type annotations on Class Parameters (ClassParameters.java).
    72         { "typeannos/ExtendsBound.html",
    76         checkOutput("typeannos/ExtendsBound.html", true,
    73             "class <span class=\"typeNameLabel\">ExtendsBound&lt;K extends <a " +
    77                 "class <span class=\"typeNameLabel\">ExtendsBound&lt;K extends <a "
    74             "href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
    78                 + "href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
    75             "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>"
    79                 + "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>");
    76         },
    80 
    77         { "typeannos/ExtendsGeneric.html",
    81         checkOutput("typeannos/ExtendsGeneric.html", true,
    78             "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric&lt;K extends " +
    82                 "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric&lt;K extends "
    79             "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in " +
    83                 + "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
    80             "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" " +
    84                 + "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" "
    81             "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\"" +
    85                 + "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\""
    82             "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">" +
    86                 + "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">"
    83             "@ClassParamB</a> java.lang.String&gt;&gt;</span>"
    87                 + "@ClassParamB</a> java.lang.String&gt;&gt;</span>");
    84         },
    88 
    85         { "typeannos/TwoBounds.html",
    89         checkOutput("typeannos/TwoBounds.html", true,
    86             "<pre>class <span class=\"typeNameLabel\">TwoBounds&lt;K extends <a href=\"" +
    90                 "<pre>class <span class=\"typeNameLabel\">TwoBounds&lt;K extends <a href=\""
    87             "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
    91                 + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
    88             "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/" +
    92                 + "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/"
    89             "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB" +
    93                 + "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB"
    90             "</a> java.lang.String&gt;</span>"
    94                 + "</a> java.lang.String&gt;</span>");
    91         },
    95 
    92         { "typeannos/Complex1.html",
    96         checkOutput("typeannos/Complex1.html", true,
    93             "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\"../" +
    97                 "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\"../"
    94             "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">" +
    98                 + "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
    95             "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>"
    99                 + "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>");
    96         },
   100 
    97         { "typeannos/Complex2.html",
   101         checkOutput("typeannos/Complex2.html", true,
    98             "class <span class=\"typeNameLabel\">Complex2&lt;K extends java.lang." +
   102                 "class <span class=\"typeNameLabel\">Complex2&lt;K extends java.lang."
    99             "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\"" +
   103                 + "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\""
   100             "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>"
   104                 + "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>");
   101         },
   105 
   102         { "typeannos/ComplexBoth.html",
   106         checkOutput("typeannos/ComplexBoth.html", true,
   103             "class <span class=\"typeNameLabel\">ComplexBoth&lt;K extends <a href=\"" +
   107                 "class <span class=\"typeNameLabel\">ComplexBoth&lt;K extends <a href=\""
   104             "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\"" +
   108                 + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\""
   105             ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/" +
   109                 + ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/"
   106             "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA" +
   110                 + "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA"
   107             "</a> java.lang.Runnable&gt;</span>"
   111                 + "</a> java.lang.Runnable&gt;</span>");
   108         },
       
   109 
   112 
   110         // Test for type annotations on fields (Fields.java).
   113         // Test for type annotations on fields (Fields.java).
   111         { "typeannos/DefaultScope.html",
   114         checkOutput("typeannos/DefaultScope.html", true,
   112             "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in " +
   115                 "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in "
   113             "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" " +
   116                 + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
   114             "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " +
   117                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
   115             "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" +
   118                 + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
   116             "@FldB</a> java.lang.String&gt; bothTypeArgs</pre>"
   119                 + "@FldB</a> java.lang.String&gt; bothTypeArgs</pre>",
   117         },
   120 
   118         { "typeannos/DefaultScope.html",
   121                 "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in "
   119             "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in " +
   122                 + "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/"
   120             "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/" +
   123                 + "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
   121             "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] " +
   124                 + "array1Deep</pre>",
   122             "array1Deep</pre>"
   125 
   123         },
   126                 "<pre>java.lang.String[] <a href=\"../typeannos/FldB.html\" "
   124         { "typeannos/DefaultScope.html",
   127                 + "title=\"annotation in typeannos\">@FldB</a> [] array2SecondOld</pre>",
   125             "<pre>java.lang.String[] <a href=\"../typeannos/FldB.html\" " +
   128 
   126             "title=\"annotation in typeannos\">@FldB</a> [] array2SecondOld</pre>"
   129                 "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in "
   127         },
   130                 + "typeannos\">@FldD</a> java.lang.String <a href=\"../typeannos/"
   128         { "typeannos/DefaultScope.html",
   131                 + "FldC.html\" title=\"annotation in typeannos\">@FldC</a> <a href=\""
   129             "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in " +
   132                 + "../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA"
   130             "typeannos\">@FldD</a> java.lang.String <a href=\"../typeannos/" +
   133                 + "</a> [] <a href=\"../typeannos/FldC.html\" title=\"annotation in "
   131             "FldC.html\" title=\"annotation in typeannos\">@FldC</a> <a href=\"" +
   134                 + "typeannos\">@FldC</a> <a href=\"../typeannos/FldB.html\" title=\""
   132             "../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA" +
   135                 + "annotation in typeannos\">@FldB</a> [] array2Deep</pre>");
   133             "</a> [] <a href=\"../typeannos/FldC.html\" title=\"annotation in " +
   136 
   134             "typeannos\">@FldC</a> <a href=\"../typeannos/FldB.html\" title=\"" +
   137         checkOutput("typeannos/ModifiedScoped.html", true,
   135             "annotation in typeannos\">@FldB</a> [] array2Deep</pre>"
   138                 "<pre>public final&nbsp;<a href=\"../typeannos/Parameterized.html\" "
   136         },
   139                 + "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\"../"
   137         { "typeannos/ModifiedScoped.html",
   140                 + "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> "
   138             "<pre>public final&nbsp;<a href=\"../typeannos/Parameterized.html\" " +
   141                 + "<a href=\"../typeannos/Parameterized.html\" title=\"class in "
   139             "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\"../" +
   142                 + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
   140             "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> " +
   143                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
   141             "<a href=\"../typeannos/Parameterized.html\" title=\"class in " +
   144                 + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
   142             "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" " +
   145                 + "@FldB</a> java.lang.String&gt;,<a href=\"../typeannos/FldB.html\" "
   143             "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a " +
   146                 + "title=\"annotation in typeannos\">@FldB</a> java.lang.String&gt; "
   144             "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">" +
   147                 + "nestedParameterized</pre>",
   145             "@FldB</a> java.lang.String&gt;,<a href=\"../typeannos/FldB.html\" " +
   148 
   146             "title=\"annotation in typeannos\">@FldB</a> java.lang.String&gt; " +
   149                 "<pre>public final&nbsp;<a href=\"../typeannos/FldA.html\" "
   147             "nestedParameterized</pre>"
   150                 + "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] "
   148         },
   151                 + "array2</pre>");
   149         { "typeannos/ModifiedScoped.html",
       
   150             "<pre>public final&nbsp;<a href=\"../typeannos/FldA.html\" " +
       
   151             "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] " +
       
   152             "array2</pre>"
       
   153         },
       
   154 
   152 
   155         // Test for type annotations on method return types (MethodReturnType.java).
   153         // Test for type annotations on method return types (MethodReturnType.java).
   156         { "typeannos/MtdDefaultScope.html",
   154         checkOutput("typeannos/MtdDefaultScope.html", true,
   157             "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"../typeannos/MRtnA.html\" " +
   155                 "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"../typeannos/MRtnA.html\" "
   158             "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String" +
   156                 + "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String"
   159             "&nbsp;method()</pre>"
   157                 + "&nbsp;method()</pre>",
   160         },
   158 
   161         { "typeannos/MtdDefaultScope.html",
   159                 "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in "
   162             "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " +
   160                 + "typeannos\">@MRtnA</a> java.lang.String <a href=\"../typeannos/"
   163             "typeannos\">@MRtnA</a> java.lang.String <a href=\"../typeannos/" +
   161                 + "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> [] <a "
   164             "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> [] <a " +
   162                 + "href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">"
   165             "href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">" +
   163                 + "@MRtnB</a> []&nbsp;array2Deep()</pre>",
   166             "@MRtnB</a> []&nbsp;array2Deep()</pre>"
   164 
   167         },
   165                 "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in "
   168         { "typeannos/MtdDefaultScope.html",
   166                 + "typeannos\">@MRtnA</a> java.lang.String[][]&nbsp;array2()</pre>");
   169             "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in " +
   167 
   170             "typeannos\">@MRtnA</a> java.lang.String[][]&nbsp;array2()</pre>"
   168         checkOutput("typeannos/MtdModifiedScoped.html", true,
   171         },
   169                 "<pre>public final&nbsp;<a href=\"../typeannos/MtdParameterized.html\" "
   172         { "typeannos/MtdModifiedScoped.html",
   170                 + "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\"../"
   173             "<pre>public final&nbsp;<a href=\"../typeannos/MtdParameterized.html\" " +
   171                 + "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> "
   174             "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\"../" +
   172                 + "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in "
   175             "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> " +
   173                 + "typeannos\">MtdParameterized</a>&lt;<a href=\"../typeannos/MRtnA."
   176             "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in " +
   174                 + "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang."
   177             "typeannos\">MtdParameterized</a>&lt;<a href=\"../typeannos/MRtnA." +
   175                 + "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in "
   178             "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang." +
   176                 + "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\"../typeannos/"
   179             "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in " +
   177                 + "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java."
   180             "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\"../typeannos/" +
   178                 + "lang.String&gt;&nbsp;nestedMtdParameterized()</pre>");
   181             "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java." +
       
   182             "lang.String&gt;&nbsp;nestedMtdParameterized()</pre>"
       
   183         },
       
   184 
   179 
   185         // Test for type annotations on method type parameters (MethodTypeParameters.java).
   180         // Test for type annotations on method type parameters (MethodTypeParameters.java).
   186         { "typeannos/UnscopedUnmodified.html",
   181         checkOutput("typeannos/UnscopedUnmodified.html", true,
   187             "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" +
   182                 "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
   188             "annotation in typeannos\">@MTyParamA</a> java.lang.String&gt;" +
   183                 + "annotation in typeannos\">@MTyParamA</a> java.lang.String&gt;"
   189             "&nbsp;void&nbsp;methodExtends()</pre>"
   184                 + "&nbsp;void&nbsp;methodExtends()</pre>",
   190         },
   185 
   191         { "typeannos/UnscopedUnmodified.html",
   186                 "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
   192             "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\"" +
   187                 + "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/"
   193             "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/" +
   188                 + "MtdTyParameterized.html\" title=\"class in typeannos\">"
   194             "MtdTyParameterized.html\" title=\"class in typeannos\">" +
   189                 + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
   195             "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" " +
   190                 + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
   196             "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" +
   191                 + "&gt;&gt;&nbsp;void&nbsp;nestedExtends()</pre>");
   197             "&gt;&gt;&nbsp;void&nbsp;nestedExtends()</pre>"
   192 
   198         },
   193         checkOutput("typeannos/PublicModifiedMethods.html", true,
   199         { "typeannos/PublicModifiedMethods.html",
   194                 "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
   200             "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/" +
   195                 + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
   201             "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " +
   196                 + "java.lang.String&gt;&nbsp;void&nbsp;methodExtends()</pre>",
   202             "java.lang.String&gt;&nbsp;void&nbsp;methodExtends()</pre>"
   197 
   203         },
   198                 "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
   204         { "typeannos/PublicModifiedMethods.html",
   199                 + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
   205             "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/" +
   200                 + "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" "
   206             "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " +
   201                 + "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../"
   207             "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" " +
   202                 + "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">"
   208             "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../" +
   203                 + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
   209             "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">" +
   204                 + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
   210             "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" " +
   205                 + "&gt;&gt;&nbsp;void&nbsp;dual()</pre>");
   211             "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String" +
       
   212             "&gt;&gt;&nbsp;void&nbsp;dual()</pre>"
       
   213         },
       
   214 
   206 
   215         // Test for type annotations on parameters (Parameters.java).
   207         // Test for type annotations on parameters (Parameters.java).
   216         { "typeannos/Parameters.html",
   208         checkOutput("typeannos/Parameters.html", true,
   217             "<pre>void&nbsp;unannotated(<a href=\"../typeannos/" +
   209                 "<pre>void&nbsp;unannotated(<a href=\"../typeannos/"
   218             "ParaParameterized.html\" title=\"class in typeannos\">" +
   210                 + "ParaParameterized.html\" title=\"class in typeannos\">"
   219             "ParaParameterized</a>&lt;java.lang.String,java.lang.String&gt;" +
   211                 + "ParaParameterized</a>&lt;java.lang.String,java.lang.String&gt;"
   220             "&nbsp;a)</pre>"
   212                 + "&nbsp;a)</pre>",
   221         },
   213 
   222         { "typeannos/Parameters.html",
   214                 "<pre>void&nbsp;nestedParaParameterized(<a href=\"../typeannos/"
   223             "<pre>void&nbsp;nestedParaParameterized(<a href=\"../typeannos/" +
   215                 + "ParaParameterized.html\" title=\"class in typeannos\">"
   224             "ParaParameterized.html\" title=\"class in typeannos\">" +
   216                 + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
   225             "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" " +
   217                 + "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../"
   226             "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../" +
   218                 + "typeannos/ParaParameterized.html\" title=\"class in typeannos\">"
   227             "typeannos/ParaParameterized.html\" title=\"class in typeannos\">" +
   219                 + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
   228             "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" " +
   220                 + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String,"
   229             "title=\"annotation in typeannos\">@ParamA</a> java.lang.String," +
   221                 + "<a href=\"../typeannos/ParamB.html\" title=\"annotation in "
   230             "<a href=\"../typeannos/ParamB.html\" title=\"annotation in " +
   222                 + "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\"../"
   231             "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\"../" +
   223                 + "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB"
   232             "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB" +
   224                 + "</a> java.lang.String&gt;&nbsp;a)</pre>",
   233             "</a> java.lang.String&gt;&nbsp;a)</pre>"
   225 
   234         },
   226                 "<pre>void&nbsp;array2Deep(<a href=\"../typeannos/ParamA.html\" "
   235         { "typeannos/Parameters.html",
   227                 + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String "
   236             "<pre>void&nbsp;array2Deep(<a href=\"../typeannos/ParamA.html\" " +
   228                 + "<a href=\"../typeannos/ParamA.html\" title=\"annotation in "
   237             "title=\"annotation in typeannos\">@ParamA</a> java.lang.String " +
   229                 + "typeannos\">@ParamA</a> [] <a href=\"../typeannos/ParamB.html\" "
   238             "<a href=\"../typeannos/ParamA.html\" title=\"annotation in " +
   230                 + "title=\"annotation in typeannos\">@ParamB</a> []&nbsp;a)</pre>");
   239             "typeannos\">@ParamA</a> [] <a href=\"../typeannos/ParamB.html\" " +
       
   240             "title=\"annotation in typeannos\">@ParamB</a> []&nbsp;a)</pre>"
       
   241         },
       
   242 
   231 
   243         // Test for type annotations on throws (Throws.java).
   232         // Test for type annotations on throws (Throws.java).
   244         { "typeannos/ThrDefaultUnmodified.html",
   233         checkOutput("typeannos/ThrDefaultUnmodified.html", true,
   245             "<pre>void&nbsp;oneException()\n" +
   234                 "<pre>void&nbsp;oneException()\n"
   246             "           throws <a href=\"../typeannos/ThrA.html\" title=\"" +
   235                 + "           throws <a href=\"../typeannos/ThrA.html\" title=\""
   247             "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
   236                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
   248         },
   237 
   249         { "typeannos/ThrDefaultUnmodified.html",
   238                 "<pre>void&nbsp;twoExceptions()\n"
   250             "<pre>void&nbsp;twoExceptions()\n" +
   239                 + "            throws <a href=\"../typeannos/ThrA.html\" title=\""
   251             "            throws <a href=\"../typeannos/ThrA.html\" title=\"" +
   240                 + "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
   252             "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n" +
   241                 + "                   <a href=\"../typeannos/ThrA.html\" title=\""
   253             "                   <a href=\"../typeannos/ThrA.html\" title=\"" +
   242                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
   254             "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
   243 
   255         },
   244         checkOutput("typeannos/ThrPublicModified.html", true,
   256         { "typeannos/ThrPublicModified.html",
   245                 "<pre>public final&nbsp;void&nbsp;oneException(java.lang.String&nbsp;a)\n"
   257             "<pre>public final&nbsp;void&nbsp;oneException(java.lang.String&nbsp;a)\n" +
   246                 + "                        throws <a href=\"../typeannos/ThrA.html\" "
   258             "                        throws <a href=\"../typeannos/ThrA.html\" " +
   247                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
   259             "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
   248 
   260         },
   249                 "<pre>public final&nbsp;void&nbsp;twoExceptions(java.lang.String&nbsp;a)\n"
   261         { "typeannos/ThrPublicModified.html",
   250                 + "                         throws <a href=\"../typeannos/ThrA.html\" "
   262             "<pre>public final&nbsp;void&nbsp;twoExceptions(java.lang.String&nbsp;a)\n" +
   251                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
   263             "                         throws <a href=\"../typeannos/ThrA.html\" " +
   252                 + "                                <a href=\"../typeannos/ThrA.html\" "
   264             "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n" +
   253                 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
   265             "                                <a href=\"../typeannos/ThrA.html\" " +
   254 
   266             "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
   255         checkOutput("typeannos/ThrWithValue.html", true,
   267         },
   256                 "<pre>void&nbsp;oneException()\n"
   268         { "typeannos/ThrWithValue.html",
   257                 + "           throws <a href=\"../typeannos/ThrB.html\" title=\""
   269             "<pre>void&nbsp;oneException()\n" +
   258                 + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
   270             "           throws <a href=\"../typeannos/ThrB.html\" title=\"" +
   259                 + "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>",
   271             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
   260 
   272             "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>"
   261                 "<pre>void&nbsp;twoExceptions()\n"
   273         },
   262                 + "            throws <a href=\"../typeannos/ThrB.html\" title=\""
   274         { "typeannos/ThrWithValue.html",
   263                 + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
   275             "<pre>void&nbsp;twoExceptions()\n" +
   264                 + "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException,\n"
   276             "            throws <a href=\"../typeannos/ThrB.html\" title=\"" +
   265                 + "                   <a href=\"../typeannos/ThrA.html\" title=\""
   277             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
   266                 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
   278             "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException,\n" +
       
   279             "                   <a href=\"../typeannos/ThrA.html\" title=\"" +
       
   280             "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
       
   281         },
       
   282 
   267 
   283         // Test for type annotations on type parameters (TypeParameters.java).
   268         // Test for type annotations on type parameters (TypeParameters.java).
   284         { "typeannos/TestMethods.html",
   269         checkOutput("typeannos/TestMethods.html", true,
   285             "<pre>&lt;K,V extends <a href=\"../typeannos/TyParaA.html\" title=\"" +
   270                 "<pre>&lt;K,V extends <a href=\"../typeannos/TyParaA.html\" title=\""
   286             "annotation in typeannos\">@TyParaA</a> java.lang.String&gt;&nbsp;" +
   271                 + "annotation in typeannos\">@TyParaA</a> java.lang.String&gt;&nbsp;"
   287             "void&nbsp;secondAnnotated()</pre>"
   272                 + "void&nbsp;secondAnnotated()</pre>");
   288         },
       
   289 
   273 
   290         // Test for type annotations on wildcard type (Wildcards.java).
   274         // Test for type annotations on wildcard type (Wildcards.java).
   291         { "typeannos/BoundTest.html",
   275         checkOutput("typeannos/BoundTest.html", true,
   292             "<pre>void&nbsp;wcExtends(<a href=\"../typeannos/MyList.html\" " +
   276                 "<pre>void&nbsp;wcExtends(<a href=\"../typeannos/MyList.html\" "
   293             "title=\"class in typeannos\">MyList</a>&lt;? extends <a href=\"" +
   277                 + "title=\"class in typeannos\">MyList</a>&lt;? extends <a href=\""
   294             "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA" +
   278                 + "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA"
   295             "</a> java.lang.String&gt;&nbsp;l)</pre>"
   279                 + "</a> java.lang.String&gt;&nbsp;l)</pre>",
   296         },
   280 
   297         { "typeannos/BoundTest.html",
   281                 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
   298             "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
   282                 + "typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/WldA.html\" "
   299             "typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/WldA.html\" " +
   283                 + "title=\"annotation in typeannos\">@WldA</a> java.lang.String&gt;"
   300             "title=\"annotation in typeannos\">@WldA</a> java.lang.String&gt;" +
   284                 + "&nbsp;returnWcSuper()</pre>");
   301             "&nbsp;returnWcSuper()</pre>"
   285 
   302         },
   286         checkOutput("typeannos/BoundWithValue.html", true,
   303         { "typeannos/BoundWithValue.html",
   287                 "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
   304             "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" +
   288                 + "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/"
   305             "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/" +
   289                 + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\""
   306             "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" +
   290                 + "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang."
   307             "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." +
   291                 + "String&gt;&nbsp;l)</pre>",
   308             "String&gt;&nbsp;l)</pre>"
   292 
   309         },
   293                 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
   310         { "typeannos/BoundWithValue.html",
   294                 + "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB."
   311             "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
   295                 + "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../"
   312             "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB." +
   296                 + "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String"
   313             "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" +
   297                 + "&gt;&nbsp;returnWcExtends()</pre>");
   314             "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" +
       
   315             "&gt;&nbsp;returnWcExtends()</pre>"
       
   316         },
       
   317 
   298 
   318         // Test for receiver annotations (Receivers.java).
   299         // Test for receiver annotations (Receivers.java).
   319         { "typeannos/DefaultUnmodified.html",
   300         checkOutput("typeannos/DefaultUnmodified.html", true,
   320             "<pre>void&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" " +
   301                 "<pre>void&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" "
   321             "title=\"annotation in typeannos\">@RcvrA</a>&nbsp;" +
   302                 + "title=\"annotation in typeannos\">@RcvrA</a>&nbsp;"
   322             "DefaultUnmodified&nbsp;this)\n" +
   303                 + "DefaultUnmodified&nbsp;this)\n"
   323             "            throws java." +
   304                 + "            throws java."
   324             "lang.Exception</pre>"
   305                 + "lang.Exception</pre>",
   325         },
   306 
   326         { "typeannos/DefaultUnmodified.html",
   307                 "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA."
   327             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA." +
   308                 + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../"
   328             "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" +
   309                 + "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
   329             "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" +
   310                 + "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")"
   330             "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" +
   311                 + "&nbsp;DefaultUnmodified&nbsp;this)</pre>",
   331             "&nbsp;DefaultUnmodified&nbsp;this)</pre>"
   312 
   332         },
   313                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
   333         { "typeannos/DefaultUnmodified.html",
   314                 + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in "
   334             "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
   315                 + "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this,\n"
   335             "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " +
   316                 + "                                           T&nbsp;r)\n"
   336             "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this,\n" +
   317                 + "                                    throws java.lang.Exception</pre>");
   337             "                                           T&nbsp;r)\n" +
   318 
   338             "                                    throws java.lang.Exception</pre>"
   319         checkOutput("typeannos/PublicModified.html", true,
   339         },
   320                 "<pre>public final&nbsp;java.lang.String&nbsp;nonVoid(<a href=\""
   340         { "typeannos/PublicModified.html",
   321                 + "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">"
   341             "<pre>public final&nbsp;java.lang.String&nbsp;nonVoid(<a href=\"" +
   322                 + "@RcvrA</a>&nbsp;PublicModified&nbsp;this)</pre>",
   342             "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">" +
   323 
   343             "@RcvrA</a>&nbsp;PublicModified&nbsp;this)</pre>"
   324                 "<pre>public final&nbsp;&lt;T extends java.lang.Runnable&gt;&nbsp;"
   344         },
   325                 + "void&nbsp;accept(<a href=\"../typeannos/RcvrA.html\" title=\""
   345         { "typeannos/PublicModified.html",
   326                 + "annotation in typeannos\">@RcvrA</a>&nbsp;PublicModified&nbsp;this,\n"
   346             "<pre>public final&nbsp;&lt;T extends java.lang.Runnable&gt;&nbsp;" +
   327                 + "                                                        T&nbsp;r)\n"
   347             "void&nbsp;accept(<a href=\"../typeannos/RcvrA.html\" title=\"" +
   328                 + "                                                 throws java.lang.Exception</pre>");
   348             "annotation in typeannos\">@RcvrA</a>&nbsp;PublicModified&nbsp;this,\n" +
   329 
   349             "                                                        T&nbsp;r)\n" +
   330         checkOutput("typeannos/WithValue.html", true,
   350             "                                                 throws java.lang.Exception</pre>"
   331                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
   351         },
   332                 + "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in "
   352         { "typeannos/WithValue.html",
   333                 + "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">"
   353             "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
   334                 + "value</a>=\"m\")&nbsp;WithValue&nbsp;this,\n"
   354             "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " +
   335                 + "                                           T&nbsp;r)\n"
   355             "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" +
   336                 + "                                    throws java.lang.Exception</pre>");
   356             "value</a>=\"m\")&nbsp;WithValue&nbsp;this,\n" +
   337 
   357             "                                           T&nbsp;r)\n" +
   338         checkOutput("typeannos/WithFinal.html", true,
   358             "                                    throws java.lang.Exception</pre>"
   339                 "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB."
   359         },
   340                 + "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../"
   360         { "typeannos/WithFinal.html",
   341                 + "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal"
   361             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB." +
   342                 + "&nbsp;this)</pre>");
   362             "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" +
   343 
   363             "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal" +
   344         checkOutput("typeannos/WithBody.html", true,
   364             "&nbsp;this)</pre>"
   345                 "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\""
   365         },
   346                 + "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>");
   366         { "typeannos/WithBody.html",
   347 
   367             "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\"" +
   348         checkOutput("typeannos/Generic2.html", true,
   368             "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>"
   349                 "<pre>void&nbsp;test2(<a href=\"../typeannos/RcvrA.html\" title=\""
   369         },
   350                 + "annotation in typeannos\">@RcvrA</a>&nbsp;Generic2&lt;X&gt;&nbsp;this)</pre>");
   370         { "typeannos/Generic2.html",
       
   371             "<pre>void&nbsp;test2(<a href=\"../typeannos/RcvrA.html\" title=\"" +
       
   372             "annotation in typeannos\">@RcvrA</a>&nbsp;Generic2&lt;X&gt;&nbsp;this)</pre>"
       
   373         }
       
   374     };
       
   375 
       
   376     /**
       
   377      * The entry point of the test.
       
   378      * @param args the array of command line arguments.
       
   379      */
       
   380     public static void main(String[] args) {
       
   381         TestTypeAnnotations tester = new TestTypeAnnotations();
       
   382         tester.run(ARGS, TEST, NO_TEST);
       
   383         tester.printSummary();
       
   384     }
   351     }
   385 }
   352 }