Class LibraryResolver.Entry

java.lang.Object
org.praxislive.code.LibraryResolver.Entry
Enclosing interface:
LibraryResolver

public static final class LibraryResolver.Entry extends Object
Data type giving a resource and the additional, resolved local files that were added for that resource. The files list might be empty if another, earlier entry provided all required files.

A list can be used to report all resources that have been provided by the additional files, such as additional transitive dependencies or alternative identifiers. The primary resource must also be included in this list.

  • Constructor Details

    • Entry

      public Entry(PResource resource, List<Path> files)
      Create an Entry for the provided resource and any additional required files.
      Parameters:
      resource - resolved library identifier
      files - additional local files (may be empty)
    • Entry

      public Entry(PResource resource, List<Path> files, List<PResource> provides)
      Create an Entry for the provided resources and any additional required files. Also provide a list of all additional resources added by this entry, including
      Parameters:
      resource - resolved library identifier
      files - additional local files (may be empty)
      provides - all resources provided by this entry
      Throws:
      IllegalArgumentException - if provides does not contain resource
  • Method Details

    • resource

      public PResource resource()
      Get the primary resource.
      Returns:
      primary resource
    • provides

      public List<PResource> provides()
      Get the list of all provided resources. Will include the primary resource and possibly any transitive dependencies or alternative identifiers.
      Returns:
      all provided resources
    • files

      public List<Path> files()
      All additional files required to resolve the primary resource and its dependencies, within the existing context. May be empty.
      Returns:
      additional required files
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object