/** @return The module version, or null if there is a failure to resolve this selector. */
    public ModuleVersionResolveState resolveModuleRevisionId() {
      if (targetModuleRevision != null) {
        return targetModuleRevision;
      }
      if (failure != null) {
        return null;
      }

      idResolveResult = resolver.resolve(dependencyMetaData);
      if (idResolveResult.getFailure() != null) {
        failure = idResolveResult.getFailure();
        return null;
      }

      targetModuleRevision = resolveState.getRevision(idResolveResult.getId());
      targetModuleRevision.addResolver(this);
      targetModuleRevision.selectionReason = idResolveResult.getSelectionReason();
      targetModule = targetModuleRevision.module;

      return targetModuleRevision;
    }
    /** @return The module version, or null if there is a failure to resolve this selector. */
    public ModuleVersionResolveState resolveModuleRevisionId() {
      if (targetModuleRevision != null) {
        return targetModuleRevision;
      }
      if (failure != null) {
        return null;
      }

      idResolveResult = new DefaultBuildableComponentIdResolveResult();
      resolver.resolve(dependencyMetaData, idResolveResult);
      if (idResolveResult.getFailure() != null) {
        failure = idResolveResult.getFailure();
        return null;
      }

      targetModuleRevision = resolveState.getRevision(idResolveResult.getModuleVersionId());
      targetModuleRevision.addResolver(this);
      targetModuleRevision.selectionReason = idResolveResult.getSelectionReason();
      targetModule = targetModuleRevision.module;
      targetModule.addSelector(this);

      return targetModuleRevision;
    }