public ModuleVersionSelector getRequested() {
   ModuleComponentSelector moduleComponentSelector = dependency.getRequested();
   return DefaultModuleVersionSelector.newSelector(
       moduleComponentSelector.getGroup(),
       moduleComponentSelector.getName(),
       moduleComponentSelector.getVersion());
 }
 public DependencyMetaData withRequestedVersion(String requestedVersion) {
   if (requestedVersion.equals(requested.getVersion())) {
     return this;
   }
   ModuleVersionSelector newRequested =
       DefaultModuleVersionSelector.newSelector(
           requested.getGroup(), requested.getName(), requestedVersion);
   ComponentSelector newSelector = DefaultModuleComponentSelector.newSelector(newRequested);
   return copyWithTarget(newSelector, newRequested);
 }
 public UnresolvedDependencyEdge(UnresolvedDependencyResult dependency) {
   this.dependency = dependency;
   ModuleComponentSelector moduleComponentSelector = dependency.getAttempted();
   ModuleVersionSelector attempted =
       DefaultModuleVersionSelector.newSelector(
           moduleComponentSelector.getGroup(),
           moduleComponentSelector.getName(),
           moduleComponentSelector.getVersion());
   actual =
       DefaultModuleVersionIdentifier.newId(
           attempted.getGroup(), attempted.getName(), attempted.getVersion());
 }
 @Override
 public DependencyMetaData withTarget(ComponentSelector target) {
   if (target instanceof ModuleComponentSelector) {
     ModuleComponentSelector moduleTarget = (ModuleComponentSelector) target;
     ModuleVersionSelector requestedVersion =
         DefaultModuleVersionSelector.newSelector(
             moduleTarget.getGroup(), moduleTarget.getModule(), moduleTarget.getVersion());
     return copyWithTarget(moduleTarget, requestedVersion);
   } else if (target instanceof ProjectComponentSelector) {
     return copyWithTarget(target, requested);
   } else {
     throw new AssertionError("Invalid component selector type for substitution: " + target);
   }
 }