Example #1
0
  public void initializeMultipleModules(List<? extends IModule> modules) {
    _state = TypeSystemState.STARTING;
    try {
      // noinspection unchecked
      _defaultModule = null;
      _rootModule = null;
      _modules = (List<IModule>) modules;

      for (IModule module : modules) {
        module.update();
      }

      for (IModule module : modules) {
        pushModule(module);
        try {
          ((Module) module).initializeTypeLoaders();
        } finally {
          popModule(module);
        }
      }

      CommonServices.getCoercionManager().init();

      FrequentUsedJavaTypeCache.instance(this).init();
    } finally {
      _state = TypeSystemState.STARTED;
    }
  }
Example #2
0
  public void addModule(IModule module) {
    checkForDuplicates(module.getName());
    // noinspection unchecked
    _modules.add(module);
    module.update();

    pushModule(module);
    try {
      ((Module) module).initializeTypeLoaders();
    } finally {
      popModule(module);
    }
  }
Example #3
0
  public void uninitializeMultipleModules() {
    _state = TypeSystemState.STOPPING;
    try {
      TypeSystem.shutdown(this, false);

      for (IModule module : _modules) {
        ((Module) module).getModuleTypeLoader().uninitializeTypeLoaders();
      }

      _jreModule = null;
      _rootModule = null;

      _modules.clear();
    } finally {
      _state = TypeSystemState.STOPPED;
    }
  }
Example #4
0
 public void renameModule(IModule module, String newName) {
   ((ExecutionEnvironment) module.getExecutionEnvironment()).checkForDuplicates(newName);
   ((Module) module).setName(newName);
 }