Enum Class ComponentSelectionCause

java.lang.Object
java.lang.Enum<ComponentSelectionCause>
org.gradle.api.artifacts.result.ComponentSelectionCause
All Implemented Interfaces:
Serializable, Comparable<ComponentSelectionCause>, Constable

@Incubating public enum ComponentSelectionCause extends Enum<ComponentSelectionCause>
The possible component selection causes. There are a limited number of causes, but each of them can be provided with a custom description, via ComponentSelectionDescriptor.
Since:
4.6
  • Enum Constant Details

    • ROOT

      public static final ComponentSelectionCause ROOT
      This component was selected because it's the root component.
    • REQUESTED

      public static final ComponentSelectionCause REQUESTED
      This component was selected because it was requested directly.
    • SELECTED_BY_RULE

      public static final ComponentSelectionCause SELECTED_BY_RULE
      This component was selected by a rule.
    • FORCED

      public static final ComponentSelectionCause FORCED
      This component was selected because selection was forced on this version.
    • CONFLICT_RESOLUTION

      public static final ComponentSelectionCause CONFLICT_RESOLUTION
      This component was selected between several candidates during conflict resolution.
    • COMPOSITE_BUILD

      public static final ComponentSelectionCause COMPOSITE_BUILD
      This component was selected as a participant of a composite.
    • REJECTION

      public static final ComponentSelectionCause REJECTION
      This component was selected because another version was rejected by a rule
    • CONSTRAINT

      public static final ComponentSelectionCause CONSTRAINT
      This component was selected because of a dependency constraint
  • Method Details

    • values

      public static ComponentSelectionCause[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ComponentSelectionCause valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDefaultReason

      public String getDefaultReason()