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
|
@ -1467,13 +1467,14 @@ public class ModuleDescriptor
|
|||
* <cite>The Java Language Specification</cite>. </p>
|
||||
*
|
||||
* <p> Example usage: </p>
|
||||
* <pre>{@code ModuleDescriptor descriptor = ModuleDescriptor.newModule("stats.core")
|
||||
* {@snippet :
|
||||
* ModuleDescriptor descriptor = ModuleDescriptor.newModule("stats.core")
|
||||
* .requires("java.base")
|
||||
* .exports("org.acme.stats.core.clustering")
|
||||
* .exports("org.acme.stats.core.regression")
|
||||
* .packages(Set.of("org.acme.stats.core.internal"))
|
||||
* .build();
|
||||
* }</pre>
|
||||
* }
|
||||
*
|
||||
* @apiNote A {@code Builder} checks the components and invariants as
|
||||
* components are added to the builder. The rationale for this is to detect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue