コード例 #1
0
 public ModuleVersionSelector getRequested() {
   ModuleComponentSelector moduleComponentSelector = dependency.getRequested();
   return DefaultModuleVersionSelector.newSelector(
       moduleComponentSelector.getGroup(),
       moduleComponentSelector.getName(),
       moduleComponentSelector.getVersion());
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 @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);
   }
 }