mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8291512: Snippetize modules API examples
Reviewed-by: darcy
This commit is contained in:
parent
36c00fdd74
commit
1d16c91ba7
4 changed files with 14 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue