# ComponentSelection

interface ComponentSelection(source)

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

## Functions

getCandidate
Link copied to clipboard
abstract fun getCandidate(): ModuleComponentIdentifier
Gets the candidate version of the module.
getDescriptor
Link copied to clipboard
@Nullable
abstract fun <T> getDescriptor(descriptorClass: Class<T>): T
Used to access a specific descriptor format.
getDescriptor
Link copied to clipboard
inline fun <T : Any> ComponentSelection.getDescriptor(descriptorClass: KClass<T>): T?

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.artifacts.ComponentSelection.getDescriptor.

getMetadata
Link copied to clipboard
@Nullable
abstract fun getMetadata(): ComponentMetadata
Gets the metadata of the component.
reject
Link copied to clipboard
abstract fun reject(reason: String)
Rejects the candidate for the resolution.