Package org.gradle.api.artifacts
Interface ComponentSelection
public interface ComponentSelection
Represents a tuple of the component selector of a module and a candidate version
 to be evaluated in a component selection rule.
- 
Method SummaryModifier and TypeMethodDescriptionGets the candidate version of the module.<T> TgetDescriptor(Class<T> descriptorClass) Used to access a specific descriptor format.Gets the metadata of the component.voidRejects the candidate for the resolution.
- 
Method Details- 
getCandidateModuleComponentIdentifier getCandidate()Gets the candidate version of the module.- Returns:
- the candidate version of the module
 
- 
getMetadataGets the metadata of the component.The metadata may not be available, in which case nullis returned. Unavailable metadata may be caused by a module published without associated metadata.- Returns:
- the ComponentMetadataornullif not available
- Since:
- 5.0
 
- 
getDescriptorUsed to access a specific descriptor format.For an Ivy module, an ivy module descriptorcan be requested and returned.If the descriptor type requested does not exist for the module under selection, nullis returned.- Type Parameters:
- T- the descriptor type
- Parameters:
- descriptorClass- the descriptor class
- Returns:
- a descriptor fo the requested type, or nullif there was none of the requested type.
- Since:
- 5.0
- See Also:
 
- 
rejectRejects the candidate for the resolution.- Parameters:
- reason- The reason the candidate was rejected.
 
 
-