public <T extends ComponentResolutionState> T select(Collection<? extends T> candidates) { for (ConfigurationNode configuration : root.configurations) { for (DependencyEdge outgoingEdge : configuration.outgoingEdges) { if (outgoingEdge.dependencyMetaData.isForce() && candidates.contains(outgoingEdge.targetModuleRevision)) { outgoingEdge.targetModuleRevision.selectionReason = VersionSelectionReasons.FORCED; return (T) outgoingEdge.targetModuleRevision; } } } return null; }