| Modifier and Type | Class and Description |
|---|---|
| private static class | SystemModuleFinders.
A Spliterator for traversing the resources of a module linked into the run-time image. |
| private static class | SystemModuleFinders.
Holder class for the ImageReader. |
| private static class | SystemModuleFinders.
A ModuleFinder that finds module in an array or set of modules. |
| private static class | SystemModuleFinders.
A ModuleReader for reading resources from a module linked into the run-time image. |
| Modifier and Type | Field and Description |
|---|---|
| private static volatile ModuleFinder | |
| private static final JavaNetUriAccess | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static Stream | allModuleAttributes()
Parses the |
| pack-priv static SystemModules | |
| pack-priv static Map | |
| pack-priv static ModuleHashes. | hashSupplier(Map<String, byte[]> nameToHash, String name)
Returns a HashSupplier that returns the hash of the given module. |
| pack-priv static ModuleFinder | of(SystemModules systemModules)
Returns a ModuleFinder that is backed by the given SystemModules object. |
| private static ModuleFinder | ofModuleInfos()
Parses the |
| public static ModuleFinder | |
| private static ModuleInfo. | readModuleAttributes(ImageReader reader, String moduleName)
Returns the module's "module-info", returning a holder for its class file attributes. |
| pack-priv static SystemModules | systemModules(String initialModule)
Returns a SystemModules object to reconstitute the modules for the given initial module. |
| pack-priv static ModuleReference | toModuleReference(ModuleDescriptor descriptor, ModuleTarget target, ModuleHashes recordedHashes, ModuleHashes.
Creates a ModuleReference to the system module. |
| cachedSystemModuleFinder | back to summary |
|---|---|
| private static volatile ModuleFinder cachedSystemModuleFinder | |
| JNUA | back to summary |
|---|---|
| private static final JavaNetUriAccess JNUA | |
| USE_FAST_PATH | back to summary |
|---|---|
| private static final boolean USE_FAST_PATH | |
| SystemModuleFinders | back to summary |
|---|---|
| private SystemModuleFinders() | |
| allModuleAttributes | back to summary |
|---|---|
| private static Stream Parses the | |
| allSystemModules | back to summary |
|---|---|
| pack-priv static SystemModules allSystemModules() Returns the SystemModules object to reconstitute all modules. Returns null if this is an exploded build or java.base is patched by an exploded build. | |
| generateNameToHash | back to summary |
|---|---|
| pack-priv static Map Generates a map of module name to hash value. | |
| hashSupplier | back to summary |
|---|---|
| pack-priv static ModuleHashes. Returns a HashSupplier that returns the hash of the given module. | |
| of | back to summary |
|---|---|
| pack-priv static ModuleFinder of(SystemModules systemModules) Returns a ModuleFinder that is backed by the given SystemModules object. API Note The returned ModuleFinder is thread safe. | |
| ofModuleInfos | back to summary |
|---|---|
| private static ModuleFinder ofModuleInfos() Parses the API Note The returned ModuleFinder is thread safe. | |
| ofSystem | back to summary |
|---|---|
| public static ModuleFinder ofSystem() Returns the ModuleFinder to find all system modules. Supports both images and exploded builds. API Note Used by ModuleFinder.ofSystem() | |
| readModuleAttributes | back to summary |
|---|---|
| private static ModuleInfo. Returns the module's "module-info", returning a holder for its class file
attributes. Every module is required to have a valid | |
| systemModules | back to summary |
|---|---|
| pack-priv static SystemModules systemModules(String initialModule) Returns a SystemModules object to reconstitute the modules for the given initial module. If the initial module is null then return the SystemModules object to reconstitute the default modules. Return null if there is no SystemModules class for the initial module, this is an exploded build, or java.base is patched by an exploded build. | |
| toModuleReference | back to summary |
|---|---|
| pack-priv static ModuleReference toModuleReference(ModuleDescriptor descriptor, ModuleTarget target, ModuleHashes recordedHashes, ModuleHashes. Creates a ModuleReference to the system module. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Iterator | |
| pack-priv final String | |
| pack-priv final Deque |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | characteristics()
Implements java. Returns a set of characteristics of this Spliterator and its elements. |
| public long | estimateSize()
Implements java. Returns an estimate of the number of elements that would be
encountered by a |
| private String | next()
Returns the name of the next non-directory node or |
| public boolean | tryAdvance(Consumer<? super String> action)
Implements java. If a remaining element exists: performs the given action on it,
returning |
| public Spliterator | trySplit()
Implements java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. |
| iterator | back to summary |
|---|---|
| pack-priv Iterator<String> iterator | |
| moduleRoot | back to summary |
|---|---|
| pack-priv final String moduleRoot | |
| stack | back to summary |
|---|---|
| pack-priv final Deque<ImageReader. | |
| ModuleContentSpliterator | back to summary |
|---|---|
| pack-priv ModuleContentSpliterator(String module) throws IOException | |
| characteristics | back to summary |
|---|---|
| public int characteristics() Implements java. Doc from java. Returns a set of characteristics of this Spliterator and its
elements. The result is represented as ORed values from If a Spliterator reports an inconsistent set of characteristics (either those returned from a single invocation or across multiple invocations), no guarantees can be made about any computation using this Spliterator.
| |
| estimateSize | back to summary |
|---|---|
| public long estimateSize() Implements java. Doc from java. Returns an estimate of the number of elements that would be
encountered by a If this Spliterator is
| |
| next | back to summary |
|---|---|
| private String next() throws IOException Returns the name of the next non-directory node or | |
| tryAdvance | back to summary |
|---|---|
| public boolean tryAdvance(Consumer<? super String> action) Implements java. Doc from java. If a remaining element exists: performs the given action on it,
returning Subsequent behavior of a spliterator is unspecified if the action throws an exception.
| |
| trySplit | back to summary |
|---|---|
| public Spliterator Implements java. Doc from java. If this spliterator can be partitioned, returns a Spliterator covering elements, that will, upon return from this method, not be covered by this Spliterator. If this Spliterator is Unless this Spliterator covers an infinite number of elements,
repeated calls to
This method may return
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ImageReader |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ImageReader |
| READER | back to summary |
|---|---|
| pack-priv static final ImageReader READER | |
| SystemImage | back to summary |
|---|---|
| private SystemImage() | |
| reader | back to summary |
|---|---|
| pack-priv static ImageReader reader() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Set | |
| pack-priv final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | find(String name)
Implements java. Finds a reference to a module of a given name. |
| public Set | findAll()
Implements java. Returns the set of all module references that this finder can locate. |
| mrefs | back to summary |
|---|---|
| pack-priv final Set<ModuleReference> mrefs | |
| nameToModule | back to summary |
|---|---|
| pack-priv final Map<String, ModuleReference> nameToModule | |
| SystemModuleFinder | back to summary |
|---|---|
| pack-priv SystemModuleFinder(ModuleReference[] array, Map. | |
| SystemModuleFinder | back to summary |
|---|---|
| pack-priv SystemModuleFinder(Set<ModuleReference> mrefs, Map<String, ModuleReference> nameToModule) | |
| find | back to summary |
|---|---|
| public Optional Implements java. Doc from java. Finds a reference to a module of a given name. A
| |
| findAll | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns the set of all module references that this finder can locate. A
| |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private boolean | containsResource(String module, String name)
Returns |
| public Optional | find(String name)
Implements java. Finds a resource, returning a URI to the resource in the module. |
| private ImageReader. | |
| public Stream | list()
Implements java. Lists the contents of the module, returning a stream of elements that are the names of all resources in the module. |
| public Optional | open(String name)
Overrides default java. Opens a resource, returning an input stream to read the resource in the module. |
| public Optional | read(String name)
Overrides default java. Reads a resource, returning a byte buffer with the contents of the resource. |
| private InputStream |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| module | back to summary |
|---|---|
| private final String module | |
| SystemModuleReader | back to summary |
|---|---|
| pack-priv SystemModuleReader(String module) | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes the module reader. Once closed then subsequent calls to locate or
read a resource will fail by throwing A module reader is not required to be asynchronously closeable. If a thread is reading a resource and another thread invokes the close method, then the second thread may block until the read operation is complete.
| |
| containsResource | back to summary |
|---|---|
| private boolean containsResource(String module, String name) throws IOException Returns | |
| find | back to summary |
|---|---|
| public Optional Implements java. Doc from java. Finds a resource, returning a URI to the resource in the module. If the module reader can determine that the name locates a directory then the resulting URI will end with a slash ('/').
| |
| findResource | back to summary |
|---|---|
| private ImageReader. Returns the node for the given resource if found. If the name references
a non-resource node, then | |
| list | back to summary |
|---|---|
| public Stream Implements java. Doc from java. Lists the contents of the module, returning a stream of elements that are the names of all resources in the module. Whether the stream of elements includes names corresponding to directories in the module is module reader specific. In lazy implementations then an The returned stream may contain references to one or more open directories in the module. The directories are closed by closing the stream. The behavior of the stream when used after the module reader is closed is implementation specific and therefore not specified.
| |
| open | back to summary |
|---|---|
| public Optional Overrides default java. Doc from java. Opens a resource, returning an input stream to read the resource in the module. The behavior of the input stream when used after the module reader is closed is implementation specific and therefore not specified.
| |
| read | back to summary |
|---|---|
| public Optional Overrides default java. Doc from java. Reads a resource, returning a byte buffer with the contents of the
resource.
The element at the returned buffer's position is the first byte of the
resource, the element at the buffer's limit is the last byte of the
resource. Once consumed, the
| |
| toInputStream | back to summary |
|---|---|
| private InputStream toInputStream(ByteBuffer bb) | |