Package manifold.internal.runtime
Class ManModuleReader
- java.lang.Object
-
- manifold.internal.runtime.ManModuleReader
-
public class ManModuleReader extends Object
This class facilitates dynamic class loading via Type Manifolds in a Java 9 *modular* configuration. Note non-modular projects use Java 8, Java 9 with -source = 8, or Java 9 with no module-info.java; only a project using Java 9+ with module-info.java requires this class. Basically ManModuleReader exploits Java 9's one-module-per-package rule... Since Java 9 maps each package name uniquely to a single module, a class of a given package must either load from that module or not load at all. ManModuleReader contributes to this loading by first delegating to the normal ModuleReader and, if the class fails to load, let Manifold attempt to load it. Since Manifold is compiled exclusively with Java 8, this class implements ModuleReader structurally via proxy.
-
-
Constructor Summary
Constructors Constructor Description ManModuleReader(Object delegate, Object ucp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Optional<URI>find(String name)Stream<String>list()Optional<InputStream>open(String name)Optional<ByteBuffer>read(String name)voidrelease(ByteBuffer bb)
-
-
-
Method Detail
-
find
public Optional<URI> find(String name) throws IOException
- Throws:
IOException
-
open
public Optional<InputStream> open(String name)
-
read
public Optional<ByteBuffer> read(String name) throws IOException
- Throws:
IOException
-
release
public void release(ByteBuffer bb)
-
close
public void close()
-
-