Package org.gradle.api.artifacts.result

## Interface ResolvedComponentResult

- All Superinterfaces:
    `ComponentResult`

      public interface ResolvedComponentResult
      extends ComponentResult

  Represents a component instance in the resolved dependency graph. Provides some basic identity and dependency information about the component.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Set<? extends DependencyResult>` | `getDependencies()` | Returns the dependencies of this component.
    `Set<? extends ResolvedDependencyResult>` | `getDependents()` | Returns the incoming dependencies of this component.
    `ModuleVersionIdentifier` | `getModuleVersion()` | Returns the module version which this component belongs to, if any.
    `ComponentSelectionReason` | `getSelectionReason()` | Returns the reason why this particular component was selected in the result.
    `ResolvedVariantResult` | `getVariant()` | Deprecated. Use `getVariants()` instead}
    `List<ResolvedVariantResult>` | `getVariants()` | Returns the variants that were selected for this component.

    - ### Methods inherited from interface org.gradle.api.artifacts.result.ComponentResult

      `getId`

- - ### Method Detail

    - #### getDependencies

          Set<? extends DependencyResult> getDependencies()

      Returns the dependencies of this component. Includes resolved and unresolved dependencies (if any).

      The elements of the returned collection are declared as `DependencyResult`, however the dependency instances will also implement one of the following instances:

      - `ResolvedDependencyResult` for dependencies which were successfully resolved.
      - `UnresolvedDependencyResult` for dependencies which could not be resolved for some reason.
      Returns:
        the dependencies of this component

    - #### getDependents

          Set<? extends ResolvedDependencyResult> getDependents()

      Returns the incoming dependencies of this component.
      Returns:
        the dependents of this component

    - #### getSelectionReason

          ComponentSelectionReason getSelectionReason()

      Returns the reason why this particular component was selected in the result. Useful if multiple candidate components were found during dependency resolution.
      Returns:
        the reason for selecting the component

    - #### getModuleVersion

          @Nullable
          ModuleVersionIdentifier getModuleVersion()

      Returns the module version which this component belongs to, if any. A component will belong to a module version if it was found in some repository, or if the module version for the component has been declared, usually by declaring how the component should be published.
      Returns:
        the module version of the component, or `null` if this component has no associated module version.

    - #### getVariant

          @Incubating
          @Deprecated
          ResolvedVariantResult getVariant()

      Deprecated.
      Use `getVariants()` instead}
      Returns the variant that was selected for this component. When Gradle metadata is not used, this usually only refers to the target "configuration" (for an Ivy dependency) or "scope" (for a Maven dependency).
      Returns:
        the resolved variant for this component
      Since:
        4.6

    - #### getVariants

          @Incubating
          List<ResolvedVariantResult> getVariants()

      Returns the variants that were selected for this component. When Gradle metadata is not used, this usually only refers to the target "configuration" (for an Ivy dependency) or "scope" (for a Maven dependency).
      Returns:
        the resolved variants for this component
      Since:
        5.2