Class JRTResolver

java.lang.Object
net.covers1624.coffeegrinder.util.resolver.JRTResolver
All Implemented Interfaces:
Closeable, AutoCloseable, Resolver

public class JRTResolver extends Object implements Resolver
Uses the built-in dynamically loaded Java Run Time FS.

This FS loads itself _from_ the target Java Home, loading the JImage modules file or exploded directories.

Created by covers1624 on 11/20/25.

  • Constructor Details

  • Method Details

    • getAllClasses

      public net.covers1624.quack.collection.FastStream<String> getAllClasses()
      Description copied from interface: Resolver
      Gets all the classes available from this Resolver.
      Specified by:
      getAllClasses in interface Resolver
      Returns:
      The classes.
    • getAllResources

      public net.covers1624.quack.collection.FastStream<String> getAllResources()
      Description copied from interface: Resolver
      Gets all the non-class files available from this Resolver.
      Specified by:
      getAllResources in interface Resolver
      Returns:
      The non-class files.
    • getResource

      public byte @Nullable [] getResource(String name) throws IOException
      Description copied from interface: Resolver
      Gets the bytes for a given resource.
      Specified by:
      getResource in interface Resolver
      Parameters:
      name - The name of the input.
      Returns:
      The bytes of the resource or literal null if no bytes were found.
      Throws:
      IOException - If an error occurred whilst reading a file.
      See Also:
    • hasResource

      public boolean hasResource(String name)
      Description copied from interface: Resolver
      Checks if this resolver is capable of resolving the given resource.
      Specified by:
      hasResource in interface Resolver
      Parameters:
      name - The resource name.
      Returns:
      If the resolver can resolve this class.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface Resolver
      Throws:
      IOException