org.eclipse.aether.resolution

## Class DependencyResult

- java.lang.Object
- - org.eclipse.aether.resolution.DependencyResult

-     public final class DependencyResult
      extends Object

  The result of a dependency resolution request.
  See Also:
    `RepositorySystem.resolveDependencies(RepositorySystemSession, DependencyRequest)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DependencyResult(DependencyRequest request)` Creates a new result for the specified request.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<ArtifactResult>` | `getArtifactResults()` Gets the resolution results for the dependency artifacts that matched `DependencyRequest.getFilter()`.
    `List<Exception>` | `getCollectExceptions()` Gets the exceptions that occurred while building the dependency graph.
    `DependencyRequest` | `getRequest()` Gets the resolution request that was made.
    `DependencyNode` | `getRoot()` Gets the root node of the resolved dependency graph.
    `DependencyResult` | `setArtifactResults(List<ArtifactResult> results)` Sets the resolution results for the artifacts that matched `DependencyRequest.getFilter()`.
    `DependencyResult` | `setCollectExceptions(List<Exception> exceptions)` Records the specified exceptions while building the dependency graph.
    `DependencyResult` | `setRoot(DependencyNode root)` Sets the root node of the resolved dependency graph.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DependencyResult

          public DependencyResult(DependencyRequest request)

      Creates a new result for the specified request.
      Parameters:
        `request` - The resolution request, must not be `null`.

  - ### Method Detail

    - #### getRequest

          public DependencyRequest getRequest()

      Gets the resolution request that was made.
      Returns:
        The resolution request, never `null`.

    - #### getRoot

          public DependencyNode getRoot()

      Gets the root node of the resolved dependency graph. Note that this dependency graph might be incomplete/unfinished in case of `getCollectExceptions()` indicating errors during its calculation.
      Returns:
        The root node of the resolved dependency graph or `null` if none.

    - #### setRoot

          public DependencyResult setRoot(DependencyNode root)

      Sets the root node of the resolved dependency graph.
      Parameters:
        `root` - The root node of the resolved dependency graph, may be `null`.
      Returns:
        This result for chaining, never `null`.

    - #### getCollectExceptions

          public List<Exception> getCollectExceptions()

      Gets the exceptions that occurred while building the dependency graph.
      Returns:
        The exceptions that occurred, never `null`.

    - #### setCollectExceptions

          public DependencyResult setCollectExceptions(List<Exception> exceptions)

      Records the specified exceptions while building the dependency graph.
      Parameters:
        `exceptions` - The exceptions to record, may be `null`.
      Returns:
        This result for chaining, never `null`.

    - #### getArtifactResults

          public List<ArtifactResult> getArtifactResults()

      Gets the resolution results for the dependency artifacts that matched `DependencyRequest.getFilter()`.
      Returns:
        The resolution results for the dependency artifacts, never `null`.

    - #### setArtifactResults

          public DependencyResult setArtifactResults(List<ArtifactResult> results)

      Sets the resolution results for the artifacts that matched `DependencyRequest.getFilter()`.
      Parameters:
        `results` - The resolution results for the artifacts, may be `null`.
      Returns:
        This result for chaining, never `null`.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2010-2012 The Eclipse Foundation. All Rights Reserved.