Class Resolver.Concatenated

java.lang.Object
net.covers1624.coffeegrinder.util.resolver.Resolver.Concatenated
All Implemented Interfaces:
Closeable, AutoCloseable, Resolver
Direct Known Subclasses:
JRTResolver
Enclosing interface:
Resolver

public static class Resolver.Concatenated extends Object implements Resolver
A resolver capable of concatenating a series of other resolvers.
  • Field Details

  • Constructor Details

    • Concatenated

      public Concatenated(List<Resolver> children)
  • 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