| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ModuleReferences.
A ModuleReader for an exploded module. |
| pack-priv static class | ModuleReferences.
A ModuleReader for a modular JAR file. |
| pack-priv static class | ModuleReferences.
A ModuleReader for a JMOD file. |
| pack-priv abstract static class | ModuleReferences.
A base module reader that encapsulates machinery required to close the module reader safely. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ModuleReference | newExplodedModule(ModuleInfo.
Creates a ModuleReference to a possibly-patched exploded module. |
| pack-priv static ModuleReference | newJarModule(ModuleInfo.
Creates a ModuleReference to a possibly-patched module in a modular JAR. |
| pack-priv static ModuleReference | newJModModule(ModuleInfo.
Creates a ModuleReference to a module in a JMOD file. |
| private static ModuleReference | newModule(ModuleInfo.
Creates a ModuleReference to a possibly-patched module |
| ModuleReferences | back to summary |
|---|---|
| private ModuleReferences() | |
| newExplodedModule | back to summary |
|---|---|
| pack-priv static ModuleReference newExplodedModule(ModuleInfo. Creates a ModuleReference to a possibly-patched exploded module. | |
| newJarModule | back to summary |
|---|---|
| pack-priv static ModuleReference newJarModule(ModuleInfo. Creates a ModuleReference to a possibly-patched module in a modular JAR. | |
| newJModModule | back to summary |
|---|---|
| pack-priv static ModuleReference newJModModule(ModuleInfo. Creates a ModuleReference to a module in a JMOD file. | |
| newModule | back to summary |
|---|---|
| private static ModuleReference newModule(ModuleInfo. Creates a ModuleReference to a possibly-patched module | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final Path |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| public Optional | find(String name)
Implements java. Finds a resource, returning a URI to the resource in the module. |
| 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. |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| dir | back to summary |
|---|---|
| private final Path dir | |
| ExplodedModuleReader | back to summary |
|---|---|
| pack-priv ExplodedModuleReader(Path dir) | |
| 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.
| |
| ensureOpen | back to summary |
|---|---|
| private void ensureOpen() throws IOException Throws IOException if the module reader is closed; | |
| 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 ('/').
| |
| 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
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private JarEntry | |
| pack-priv void | implClose()
Implements abstract jdk. Closes the module reader. |
| pack-priv Optional | implFind(String name)
Implements abstract jdk. Returns a URL to resource. |
| pack-priv Stream | implList()
Implements abstract jdk. Returns a stream of the names of resources in the module. |
| pack-priv Optional | implOpen(String name)
Implements abstract jdk. Returns an input stream for reading a resource. |
| pack-priv static JarFile |
| JarModuleReader | back to summary |
|---|---|
| pack-priv JarModuleReader(String path, URI uri) | |
| getEntry | back to summary |
|---|---|
| private JarEntry getEntry(String name) | |
| implClose | back to summary |
|---|---|
| pack-priv void implClose() throws IOException Implements abstract jdk. Doc from jdk. Closes the module reader. This method is invoked by close to do the actual work of closing the module reader.
| |
| implFind | back to summary |
|---|---|
| pack-priv Optional Implements abstract jdk. Doc from jdk. Returns a URL to resource. This method is invoked by the find method to do the actual work of finding the resource.
| |
| implList | back to summary |
|---|---|
| pack-priv Stream Implements abstract jdk. Doc from jdk. Returns a stream of the names of resources in the module. This method is invoked by the list method to do the actual work of creating the stream.
| |
| implOpen | back to summary |
|---|---|
| pack-priv Optional Implements abstract jdk. Doc from jdk. Returns an input stream for reading a resource. This method is invoked by the open method to do the actual work of opening an input stream to the resource.
| |
| newJarFile | back to summary |
|---|---|
| pack-priv static JarFile newJarFile(String path) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private JmodFile. | |
| pack-priv void | implClose()
Implements abstract jdk. Closes the module reader. |
| pack-priv Optional | implFind(String name)
Implements abstract jdk. Returns a URL to resource. |
| pack-priv Stream | implList()
Implements abstract jdk. Returns a stream of the names of resources in the module. |
| pack-priv Optional | implOpen(String name)
Implements abstract jdk. Returns an input stream for reading a resource. |
| pack-priv static JmodFile |
| JModModuleReader | back to summary |
|---|---|
| pack-priv JModModuleReader(Path path, URI uri) | |
| getEntry | back to summary |
|---|---|
| private JmodFile. | |
| implClose | back to summary |
|---|---|
| pack-priv void implClose() throws IOException Implements abstract jdk. Doc from jdk. Closes the module reader. This method is invoked by close to do the actual work of closing the module reader.
| |
| implFind | back to summary |
|---|---|
| pack-priv Optional Implements abstract jdk. Doc from jdk. Returns a URL to resource. This method is invoked by the find method to do the actual work of finding the resource.
| |
| implList | back to summary |
|---|---|
| pack-priv Stream Implements abstract jdk. Doc from jdk. Returns a stream of the names of resources in the module. This method is invoked by the list method to do the actual work of creating the stream.
| |
| implOpen | back to summary |
|---|---|
| pack-priv Optional Implements abstract jdk. Doc from jdk. Returns an input stream for reading a resource. This method is invoked by the open method to do the actual work of opening an input stream to the resource.
| |
| newJmodFile | back to summary |
|---|---|
| pack-priv static JmodFile newJmodFile(Path path) | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final ReadWriteLock | |
| private final Lock | |
| private final Lock |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final Optional | find(String name)
Implements java. Finds a resource, returning a URI to the resource in the module. |
| pack-priv abstract void | |
| pack-priv abstract Optional | |
| pack-priv abstract Stream | |
| pack-priv abstract Optional | |
| public final 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 final Optional | open(String name)
Overrides default java. Opens a resource, returning an input stream to read the resource in the module. |
| closed | back to summary |
|---|---|
| private boolean closed | |
| lock | back to summary |
|---|---|
| private final ReadWriteLock lock | |
| readLock | back to summary |
|---|---|
| private final Lock readLock | |
| writeLock | back to summary |
|---|---|
| private final Lock writeLock | |
| SafeCloseModuleReader | back to summary |
|---|---|
| pack-priv SafeCloseModuleReader() | |
| close | back to summary |
|---|---|
| public final void close() throws IOException 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.
| |
| find | back to summary |
|---|---|
| public final 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 ('/').
| |
| implClose | back to summary |
|---|---|
| pack-priv abstract void implClose() throws IOException Closes the module reader. This method is invoked by close to do the actual work of closing the module reader. | |
| implFind | back to summary |
|---|---|
| pack-priv abstract Optional Returns a URL to resource. This method is invoked by the find method to do the actual work of finding the resource. | |
| implList | back to summary |
|---|---|
| pack-priv abstract Stream Returns a stream of the names of resources in the module. This method is invoked by the list method to do the actual work of creating the stream. | |
| implOpen | back to summary |
|---|---|
| pack-priv abstract Optional Returns an input stream for reading a resource. This method is invoked by the open method to do the actual work of opening an input stream to the resource. | |
| list | back to summary |
|---|---|
| public final 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 final 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.
| |