Interface JVMPluginResource

All Superinterfaces:
PluginResource, ResourceQueryable

public interface JVMPluginResource extends PluginResource
  • Method Details

    • manifest

      Manifest manifest()
    • resourcesRoot

      Path resourcesRoot()
      Retrieves the root path containing all the resources. This may or may not be the root of the file system containing the resources.
      Returns:
      The root path containing all the resources.
    • property

      default Optional<String> property(String key)
      Description copied from interface: PluginResource
      Retrieve a property of this resource by key.

      Consult the vendor for expected keys.

      Specified by:
      property in interface PluginResource
      Parameters:
      key - The key
      Returns:
      The value or Optional.empty() if not found
    • locateResource

      default Optional<URI> locateResource(String path)
      Description copied from interface: ResourceQueryable
      Resolves the location of a bundled resource, given a relative path.
      Specified by:
      locateResource in interface ResourceQueryable
      Parameters:
      path - The relative path
      Returns:
      The resolved resource location, if available
    • create

      static JVMPluginResource create(Environment environment, String locator, Path... paths)
      Creates a JVMPluginResource from an array of paths. Each path can point to a JAR file or a directory. When multiple paths are given, the resulting resource is a virtual union of all files contained by these paths.
      Parameters:
      environment - The environment
      locator - The locator that created this resource
      paths - The paths
      Returns:
      The JVMPluginResource.