8291512: Snippetize modules API examples

Reviewed-by: darcy
This commit is contained in:
Mark Reinhold 2022-07-28 18:22:59 +00:00
parent 36c00fdd74
commit 1d16c91ba7
4 changed files with 14 additions and 21 deletions

View file

@ -54,15 +54,12 @@ import jdk.internal.module.SystemModuleFinders;
*
* <p> Example usage: </p>
*
* <pre>{@code
* Path dir1, dir2, dir3;
*
* {@snippet :
* Path dir1 = ..., dir2 = ..., dir3 = ...;
* ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3);
*
* Optional<ModuleReference> omref = finder.find("jdk.foo");
* omref.ifPresent(mref -> ... );
*
* }</pre>
* }
*
* <p> The {@link #find(String) find} and {@link #findAll() findAll} methods
* defined here can fail for several reasons. These include I/O errors, errors