public void resolveModule(ModuleManager moduleManager) {

    setModuleToTypes();

    if (resolutionState == ResolutionState.IN_PROCESS) {
      throw new KurentoModuleCreatorException(
          "Found a dependency cycle in plugin '" + this.name + "'");
    }

    if (resolutionState == ResolutionState.RESOLVED) {
      log.debug("Module '" + name + "' yet resolved");
      return;
    }

    log.debug("Resolving module '" + name + "'");

    this.resolutionState = ResolutionState.IN_PROCESS;

    if (kurentoVersion == null && version != null) {
      kurentoVersion = version;
    }

    resolveImports(moduleManager);
    resolveTypes(moduleManager);
    addInfoForGeneration(moduleManager);

    log.debug("Module '" + name + "' resolved");

    this.resolutionState = ResolutionState.RESOLVED;
  }