Interface DependencyResolverResult

All Superinterfaces:
DependencyCollectorResult

@Experimental public interface DependencyResolverResult extends DependencyCollectorResult
  • Method Details

    • getNodes

      @Nonnull List<Node> getNodes()
      The ordered list of the flattened dependency nodes.
      Returns:
      the ordered list of the flattened dependency nodes
    • getPaths

      @Nonnull List<Path> getPaths()
      Returns the file paths of all dependencies, regardless on which tool option those paths should be placed. The returned list may contain a mix of Java class-path, Java module-path, and other types of path elements.
      Returns:
      the paths of all dependencies
    • getDispatchedPaths

      @Nonnull Map<PathType,List<Path>> getDispatchedPaths()
      Returns the file paths of all dependencies, dispatched according the tool options where to place them. The PathType keys identify, for example, --class-path or --module-path options. In the case of Java tools, the map may also contain --patch-module options, which are handled in a special way.

      Design note: All types of path are determined together because they are sometime mutually exclusive. For example, an artifact of type "jar" can be placed either on the class-path or on the module-path. The project needs to make a choice (possibly using heuristic rules), then to add the dependency in only one of the options identified by PathType.

      Returns:
      file paths to place on the different tool options
    • getDependencies

      @Nonnull Map<Dependency,Path> getDependencies()
    • formatOption

      default Optional<String> formatOption(PathType type)
      Formats the command-line option for the path of the specified type. The option are documented in JavaPathType enumeration values.
      Parameters:
      type - the desired type of path (class-path, module-path, …)
      Returns:
      the option to pass to Java tools