< prev index next >

test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java

Print this page




 255                     MethodBuilder.parse("public void doSomething(){}"),
 256                     MethodBuilder.parse("public TA getTA(){return null;}")
 257                 ).write(srcDir);
 258     }
 259 
 260     @Test
 261     public void testStreamsMissingLinksDetail(Path base) throws Exception {
 262         Path srcDir = base.resolve("src");
 263         emitStreamsMissingLinks(srcDir);
 264 
 265         Path outDir = base.resolve("out");
 266         javadoc("-d", outDir.toString(),
 267                 "-html5",
 268                 "--override-methods=detail",
 269                 "-sourcepath", srcDir.toString(),
 270                 "p");
 271         checkExit(Exit.OK);
 272 
 273         checkOrder("p/C.html",
 274                 "METHOD DETAIL",
 275                 "public", "void", "method()",
 276                 "See Also:",
 277                 "sub()",
 278                 "sub1()");
 279 
 280         checkOrder("p/ILong.html",
 281                 "METHOD DETAIL",
 282                 "default", "void", "forEach", "java.util.function.Consumer",
 283                 "java.lang.Long", "action",
 284                 "Do you see me", "#forEach(java.util.function.LongConsumer)",
 285                 "forEach(LongConsumer)",
 286                 "END OF CLASS DATA");
 287 
 288         checkOrder("p/IImpl.html",
 289                 "METHOD DETAIL",
 290                 "Method sub in p.IImpl",
 291                 "Specified by:", "I.html", "II.html",
 292                 "END OF CLASS DATA");
 293     }
 294 
 295     @Test
 296     public void testStreamsMissingLinksSummary(Path base) throws Exception {
 297         Path srcDir = base.resolve("src");
 298         emitStreamsMissingLinks(srcDir);
 299 
 300         Path outDir = base.resolve("out");
 301         javadoc("-d", outDir.toString(),
 302                 "-html5",
 303                 "--override-methods=summary",
 304                 "-sourcepath", srcDir.toString(),
 305                 "p");
 306         checkExit(Exit.OK);
 307 
 308         checkOrder("p/C.html",
 309                 "METHOD DETAIL",
 310                 "public", "void", "method()", "See Also:", "sub()", "I.sub1()",
 311                 "public", "void", "m", "Method in C. See", "I.length()"
 312                 );
 313 
 314         checkOrder("p/ILong.html",
 315                 "METHOD DETAIL",
 316                 "default", "void", "forEach", "java.util.function.Consumer",
 317                 "java.lang.Long", "action",
 318                 "Do you see me", "QLong.html#forEach(Q)",
 319                 "QLong.forEach(LongConsumer)",
 320                 "END OF CLASS DATA");
 321 
 322         checkOrder("p/IImpl.html",
 323                 "METHOD DETAIL",
 324                 "Method sub in p.IImpl",
 325                 "Specified by:", "I.html",
 326                 "END OF CLASS DATA");
 327 
 328         checkUnique("p/IImpl.html", "Specified by:");
 329     }
 330 


 394                         MethodBuilder.parse("default void forEach(Consumer<Long> action) {}")
 395                             .setComments("Do you see me {@link #forEach(LongConsumer)} ?")
 396                 ).write(srcDir);
 397     }
 398 
 399     @Test
 400     public void testVisibleMemberTableDetail(Path base) throws Exception {
 401         Path srcDir = base.resolve("src");
 402         emitVisibleMemberTable(srcDir);
 403 
 404         Path outDir = base.resolve("out");
 405         javadoc("-d", outDir.toString(),
 406                 "-html5",
 407                 "--override-methods=detail",
 408                 "-sourcepath", srcDir.toString(),
 409                 "p");
 410         checkExit(Exit.OK);
 411 
 412         checkOrder("p/C.html",
 413                 "METHOD DETAIL",
 414                 "public", "void", "m()", "Method m in p.B",
 415                 "public", "void", "n()", "Method n in p.A",
 416                 "public", "void", "o()", "Description copied from class:", ">A<", "Method o in p.A",
 417                 "public", "void", "p()", "Method p in p.B",
 418                 "END OF CLASS DATA");
 419 
 420         checkOutput("p/C.html", false,
 421                 "Overrides",
 422                 "Methods declared in class p");
 423 
 424         checkOrder("p/D.html",
 425                 "METHOD SUMMARY",
 426                 "void", "m", "Method m in p.D",
 427                 "void", "n", "Method n in p.D",
 428                 "void", "o", "Method o in p.D",
 429                 "void", "p", "Method p in p.D",
 430                 "CONSTRUCTOR DETAIL");
 431 
 432         checkOutput("p/D.html", false,
 433                 "Description copied from class:",
 434                 "Overrides",
 435                 "Methods declared in class p");
 436 
 437         checkOrder("p/E.html",


 454         emitVisibleMemberTable(srcDir);
 455 
 456         Path outDir = base.resolve("out");
 457         javadoc("-d", outDir.toString(),
 458                 "-html5",
 459                 "--override-methods=summary",
 460                 "-sourcepath", srcDir.toString(),
 461                 "p");
 462         checkExit(Exit.OK);
 463 
 464         checkOrder("p/C.html",
 465                 "METHOD SUMMARY",
 466                 "void", "m", "Method m in p.B",
 467                 "void", "n", "Method n in p.A",
 468                 "void", "o", "Method o in p.A",
 469                 "void", "p", "Method p in p.B",
 470                 "CONSTRUCTOR DETAIL");
 471 
 472         checkOrder("p/C.html",
 473                 "METHOD DETAIL",
 474                 "public", "void", "m()", "Method m in p.B",
 475                 "public", "void", "n()", "Method n in p.A",
 476                 "public", "void", "o()", "Description copied from class:", ">A<", "Method o in p.A",
 477                 "public", "void", "p()", "Method p in p.B",
 478                 "END OF CLASS DATA");
 479 
 480         checkOutput("p/C.html", false,
 481                 "Overrides",
 482                 "Methods declared in class p");
 483 
 484         checkOrder("p/D.html",
 485                 "METHOD SUMMARY",
 486                 "void", "m", "Method m in p.D",
 487                 "void", "n", "Method n in p.D",
 488                 "void", "o", "Method o in p.D",
 489                 "void", "p", "Method p in p.D",
 490                 "CONSTRUCTOR DETAIL");
 491 
 492         checkOutput("p/D.html", false,
 493                 "Description copied from class:",
 494                 "Overrides",
 495                 "Methods declared in class p");
 496 
 497         checkOrder("p/E.html",




 255                     MethodBuilder.parse("public void doSomething(){}"),
 256                     MethodBuilder.parse("public TA getTA(){return null;}")
 257                 ).write(srcDir);
 258     }
 259 
 260     @Test
 261     public void testStreamsMissingLinksDetail(Path base) throws Exception {
 262         Path srcDir = base.resolve("src");
 263         emitStreamsMissingLinks(srcDir);
 264 
 265         Path outDir = base.resolve("out");
 266         javadoc("-d", outDir.toString(),
 267                 "-html5",
 268                 "--override-methods=detail",
 269                 "-sourcepath", srcDir.toString(),
 270                 "p");
 271         checkExit(Exit.OK);
 272 
 273         checkOrder("p/C.html",
 274                 "METHOD DETAIL",
 275                 "public", "void", "method",
 276                 "See Also:",
 277                 "sub()",
 278                 "sub1()");
 279 
 280         checkOrder("p/ILong.html",
 281                 "METHOD DETAIL",
 282                 "default", "void", "forEach", "java.util.function.Consumer",
 283                 "java.lang.Long", "action",
 284                 "Do you see me", "#forEach(java.util.function.LongConsumer)",
 285                 "forEach(LongConsumer)",
 286                 "END OF CLASS DATA");
 287 
 288         checkOrder("p/IImpl.html",
 289                 "METHOD DETAIL",
 290                 "Method sub in p.IImpl",
 291                 "Specified by:", "I.html", "II.html",
 292                 "END OF CLASS DATA");
 293     }
 294 
 295     @Test
 296     public void testStreamsMissingLinksSummary(Path base) throws Exception {
 297         Path srcDir = base.resolve("src");
 298         emitStreamsMissingLinks(srcDir);
 299 
 300         Path outDir = base.resolve("out");
 301         javadoc("-d", outDir.toString(),
 302                 "-html5",
 303                 "--override-methods=summary",
 304                 "-sourcepath", srcDir.toString(),
 305                 "p");
 306         checkExit(Exit.OK);
 307 
 308         checkOrder("p/C.html",
 309                 "METHOD DETAIL",
 310                 "public", "void", "method", "See Also:", "sub()", "I.sub1()",
 311                 "public", "void", "m", "Method in C. See", "I.length()"
 312                 );
 313 
 314         checkOrder("p/ILong.html",
 315                 "METHOD DETAIL",
 316                 "default", "void", "forEach", "java.util.function.Consumer",
 317                 "java.lang.Long", "action",
 318                 "Do you see me", "QLong.html#forEach(Q)",
 319                 "QLong.forEach(LongConsumer)",
 320                 "END OF CLASS DATA");
 321 
 322         checkOrder("p/IImpl.html",
 323                 "METHOD DETAIL",
 324                 "Method sub in p.IImpl",
 325                 "Specified by:", "I.html",
 326                 "END OF CLASS DATA");
 327 
 328         checkUnique("p/IImpl.html", "Specified by:");
 329     }
 330 


 394                         MethodBuilder.parse("default void forEach(Consumer<Long> action) {}")
 395                             .setComments("Do you see me {@link #forEach(LongConsumer)} ?")
 396                 ).write(srcDir);
 397     }
 398 
 399     @Test
 400     public void testVisibleMemberTableDetail(Path base) throws Exception {
 401         Path srcDir = base.resolve("src");
 402         emitVisibleMemberTable(srcDir);
 403 
 404         Path outDir = base.resolve("out");
 405         javadoc("-d", outDir.toString(),
 406                 "-html5",
 407                 "--override-methods=detail",
 408                 "-sourcepath", srcDir.toString(),
 409                 "p");
 410         checkExit(Exit.OK);
 411 
 412         checkOrder("p/C.html",
 413                 "METHOD DETAIL",
 414                 "public", "void", "m", "Method m in p.B",
 415                 "public", "void", "n", "Method n in p.A",
 416                 "public", "void", "o", "Description copied from class:", ">A<", "Method o in p.A",
 417                 "public", "void", "p", "Method p in p.B",
 418                 "END OF CLASS DATA");
 419 
 420         checkOutput("p/C.html", false,
 421                 "Overrides",
 422                 "Methods declared in class p");
 423 
 424         checkOrder("p/D.html",
 425                 "METHOD SUMMARY",
 426                 "void", "m", "Method m in p.D",
 427                 "void", "n", "Method n in p.D",
 428                 "void", "o", "Method o in p.D",
 429                 "void", "p", "Method p in p.D",
 430                 "CONSTRUCTOR DETAIL");
 431 
 432         checkOutput("p/D.html", false,
 433                 "Description copied from class:",
 434                 "Overrides",
 435                 "Methods declared in class p");
 436 
 437         checkOrder("p/E.html",


 454         emitVisibleMemberTable(srcDir);
 455 
 456         Path outDir = base.resolve("out");
 457         javadoc("-d", outDir.toString(),
 458                 "-html5",
 459                 "--override-methods=summary",
 460                 "-sourcepath", srcDir.toString(),
 461                 "p");
 462         checkExit(Exit.OK);
 463 
 464         checkOrder("p/C.html",
 465                 "METHOD SUMMARY",
 466                 "void", "m", "Method m in p.B",
 467                 "void", "n", "Method n in p.A",
 468                 "void", "o", "Method o in p.A",
 469                 "void", "p", "Method p in p.B",
 470                 "CONSTRUCTOR DETAIL");
 471 
 472         checkOrder("p/C.html",
 473                 "METHOD DETAIL",
 474                 "public", "void", "m", "Method m in p.B",
 475                 "public", "void", "n", "Method n in p.A",
 476                 "public", "void", "o", "Description copied from class:", ">A<", "Method o in p.A",
 477                 "public", "void", "p", "Method p in p.B",
 478                 "END OF CLASS DATA");
 479 
 480         checkOutput("p/C.html", false,
 481                 "Overrides",
 482                 "Methods declared in class p");
 483 
 484         checkOrder("p/D.html",
 485                 "METHOD SUMMARY",
 486                 "void", "m", "Method m in p.D",
 487                 "void", "n", "Method n in p.D",
 488                 "void", "o", "Method o in p.D",
 489                 "void", "p", "Method p in p.D",
 490                 "CONSTRUCTOR DETAIL");
 491 
 492         checkOutput("p/D.html", false,
 493                 "Description copied from class:",
 494                 "Overrides",
 495                 "Methods declared in class p");
 496 
 497         checkOrder("p/E.html",


< prev index next >