ComponentSelection - Gradle DSL Version 5.2.1

# ComponentSelection

API Documentation: | `ComponentSelection`

Represents a tuple of the component selector of a module and a candidate version to be evaluated in a component selection rule.

### Properties

Property | Description
`candidate` | Gets the candidate version of the module.
`metadata` | Incubating Gets the metadata of the component.

### Methods

Method | Description
`getDescriptor(descriptorClass)` | Incubating Used to access a specific descriptor format.
`reject(reason)` | Rejects the candidate for the resolution.

### Script blocks

No script blocks

### Property details

#### `ModuleComponentIdentifier` `candidate` (read-only)

Gets the candidate version of the module.

#### `ComponentMetadata` `metadata` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Gets the metadata of the component.

The metadata may not be available, in which case `null` is returned. Unavailable metadata may be caused by a module published without associated metadata.

### Method details

#### `T` `getDescriptor`(``Class`<`T`>` descriptorClass)

Note: This method is incubating and may change in a future version of Gradle.

Used to access a specific descriptor format.

For an Ivy module, an `IvyModuleDescriptor` can be requested and returned.

If the descriptor type requested does not exist for the module under selection, `null` is returned.

#### `void` `reject`(`String` reason)

Rejects the candidate for the resolution.