/** @return The resolved module version */
 public ModuleVersionResolveState resolveModuleRevisionId() {
   if (targetModuleRevision == null) {
     targetModuleRevision = selector.resolveModuleRevisionId();
     selector.getSelectedModule().addUnattachedDependency(this);
   }
   return targetModuleRevision;
 }
 public void restart(ModuleVersionResolveState selected) {
   select(selected);
   for (ModuleVersionResolveState version : versions.values()) {
     version.restart(selected);
   }
   for (ModuleVersionSelectorResolveState selector : selectors) {
     selector.restart(selected);
   }
   for (DependencyEdge dependency : new ArrayList<DependencyEdge>(unattachedDependencies)) {
     dependency.restart(selected);
   }
   unattachedDependencies.clear();
 }
 public void removeFromTargetConfigurations() {
   for (ConfigurationNode targetConfiguration : targetConfigurations) {
     targetConfiguration.removeIncomingEdge(this);
   }
   targetConfigurations.clear();
   if (targetModuleRevision != null) {
     selector.getSelectedModule().removeUnattachedDependency(this);
   }
 }
 public void attachToTargetConfigurations() {
   if (targetModuleRevision.state != ModuleState.Selected) {
     return;
   }
   calculateTargetConfigurations();
   for (ConfigurationNode targetConfiguration : targetConfigurations) {
     targetConfiguration.addIncomingEdge(this);
   }
   if (!targetConfigurations.isEmpty()) {
     selector.getSelectedModule().removeUnattachedDependency(this);
   }
 }
 public ComponentSelectionReason getReason() {
   return selector.getSelectionReason();
 }
 public ModuleVersionIdentifier getSelected() {
   return selector.getSelected().getId();
 }
 public ModuleVersionResolveException getFailure() {
   return selector.getFailure();
 }