This module is lazy-loaded by default. You can read all internal
        structure by calling this method.
493153
def read(self):
        
        stack = [self[0].child]
        while stack:
            current = stack.pop()
            if current.right:
                stack.append(current.right)
            if current.left:
                stack.append(current.left)

        self[0].seek(0)
460723
private void lazyInit() {

    if (tokenToPosTagMap != null) {
      return;
    }

    Map<String, List<MultiWordEntry>> map = new HashMap<>();

    try (InputStream stream = JLanguageTool.getDataBroker().getFromResourceDirAsStream(filename)) {
      List<String> posTokens = loadWords(stream);

      for (String posToken : posTokens) {
        String[] tokenAndTag = posToken.split("\t");
        if (tokenAndTag.length != 2) {
          throw new RuntimeException("Invalid format in " + filename + ": '" + posToken + "', expected two tab-separated parts");
        }
        
        String[] tokens = tokenAndTag[0].split(" ");
        String posTag = tokenAndTag[1];
        
        List<MultiWordEntry> multiwordItems;
        if( map.containsKey(tokens[0]) ) {
          multiwordItems = map.get(tokens[0]);
        }
        else {
          multiwordItems = new ArrayList<>();
          map.put(tokens[0], multiwordItems);
        }
        
        multiwordItems.add(new MultiWordEntry(Arrays.asList(tokens), posTag));
      }
      
      tokenToPosTagMap = map;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
211172
def _load_from_module(module):
    
    settings = OrderedDict()

    for key in dir(module):
        if key.isupper():
            settings[key] = getattr(module, key)
    return settings
455232
public static void loadDefaultEncryptionModule() {
		// Be sure that the cryptographical algorithms are loaded
		final Provider[] providers = Security.getProviders();
		boolean found = false;
		for (final Provider provider : providers) {
			if (provider instanceof SunJCE) {
				found = true;
				break;
			}
		}
		if (!found) {
			Security.addProvider(new SunJCE());
		}
	}
90765
private static void handleRealModule(final Object module, final Set<Object> visitedModules,
            final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec,
            final LogNode log) {
        if (!visitedModules.add(module)) {
            // Avoid extracting paths from the same module more than once
            return;
        }
        ClassLoader moduleLoader = (ClassLoader) ReflectionUtils.invokeMethod(module, "getClassLoader", false);
        if (moduleLoader == null) {
            moduleLoader = classLoader;
        }
        // type VFSResourceLoader[]
        final Object vfsResourceLoaders = ReflectionUtils.invokeMethod(moduleLoader, "getResourceLoaders", false);
        if (vfsResourceLoaders != null) {
            for (int i = 0, n = Array.getLength(vfsResourceLoaders); i < n; i++) {
                // type JarFileResourceLoader for jars, VFSResourceLoader for exploded jars, PathResourceLoader
                // for resource directories, or NativeLibraryResourceLoader for (usually non-existent) native
                // library "lib/" dirs adjacent to the jarfiles that they were presumably extracted from.
                final Object resourceLoader = Array.get(vfsResourceLoaders, i);
                // Could skip NativeLibraryResourceLoader instances altogether, but testing for their existence
                // only seems to add about 3% to the total scan time.
                // if (!resourceLoader.getClass().getSimpleName().equals("NativeLibraryResourceLoader")) {
                handleResourceLoader(resourceLoader, moduleLoader, classpathOrderOut, scanSpec, log);
                //}
            }
        }
    }
112351
public void setOldModule() {

        m_oldModule = true;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_OLD_MODULE_IMPORTED_0));
        }
    }
731417
function(){
		if(shuttingDown == true)
			return;
		modules.logger.log("startup","ISNode System > Loading Interface Modules...");
		var fs = require('fs');
		fs.readdirSync("./node_modules").forEach(function(file) {
  			fileSplit = file.split("-");
  			if(fileSplit[0] == "isnode" && fileSplit[1] == "mod" && fileSplit[2] == "interface" && fileSplit[3]) {
  				loadModule(file);
  			}
		});		
		return true;
	}
716691
@SuppressWarnings("resource")
    private boolean importModules() {

        boolean result = true;

        try {
            m_logStream.println("Checking module dependencies.");
            Multimap<String, String> dependencies = HashMultimap.create();
            Set<String> unsortedModules = Sets.newHashSet(m_modulesToExport);
            for (String module : m_modulesToExport) {
                String manifestPath = CmsStringUtil.joinPaths(
                    m_currentConfiguration.getModulesPath(),
                    module,
                    m_currentConfiguration.getResourcesSubFolder(),
                    "manifest.xml");
                Document doc = CmsXmlUtils.unmarshalHelper(
                    CmsFileUtil.readFully(new FileInputStream(manifestPath)),
                    new CmsXmlEntityResolver(null));

                List<?> depNodes = doc.getRootElement().selectNodes("//dependencies/dependency/@name");
                for (Object nodeObj : depNodes) {
                    Node node = ((Node)nodeObj);
                    String dependency = node.getText();
                    if (m_modulesToExport.contains(dependency)) {
                        // we can only handle dependencies between selected modules
                        // and just have to assume that other dependencies are fulfilled
                        dependencies.put(module, dependency);
                    }
                }
            }
            List<String> sortedModules = Lists.newArrayList();
            // if there are no cycles, this loop will find one element on each iteration
            for (int i = 0; i < m_modulesToExport.size(); i++) {
                String nextModule = null;
                for (String key : unsortedModules) {
                    if (dependencies.get(key).isEmpty()) {
                        nextModule = key;
                        break;
                    }
                }
                if (nextModule != null) {
                    sortedModules.add(nextModule);
                    unsortedModules.remove(nextModule);
                    for (String key : Sets.newHashSet(dependencies.keySet())) { // copy key set to avoid concurrent modification exception
                        dependencies.get(key).remove(nextModule);
                    }
                }
            }
            m_logStream.println("Modules sorted by dependencies: " + sortedModules);
            for (String moduleName : sortedModules) {
                String dir = CmsStringUtil.joinPaths(
                    m_currentConfiguration.getModulesPath(),
                    moduleName,
                    m_currentConfiguration.getResourcesSubFolder());
                File dirEntry = new File(dir);
                if (!dirEntry.exists()) {
                    continue;
                }
                try {
                    m_logStream.println("Creating temp file for module " + moduleName);
                    File outputFile = File.createTempFile(moduleName + "-", ".zip");
                    FileOutputStream fos = new FileOutputStream(outputFile);
                    m_logStream.println("Zipping module structure to " + outputFile.getAbsolutePath());
                    zipRfsFolder(dirEntry, fos);
                    result &= importModule(outputFile);
                    outputFile.delete();
                } catch (Exception e) {
                    LOG.error(e.getLocalizedMessage(), e);
                    e.printStackTrace(m_logStream);
                    result = false;
                }
            }
        } catch (Exception e) {

            LOG.error(e.getLocalizedMessage(), e);
            m_logStream.println("Unable to check dependencies for modules, giving up.");
            e.printStackTrace(m_logStream);
            result = false;
        }
        return result;
    }
850095
function(){
    // if we are not initialized, don't bother finalizing
    if (!this._isInitialized){ return; }
    this._isInitialized = false;

    Marionette.triggerMethod.call(this, "before:stop");

    // stop the sub-modules; depth-first, to make sure the
    // sub-modules are stopped / finalized before parents
    _.each(this.submodules, function(mod){ mod.stop(); });

    // run the finalizers
    this._finalizerCallbacks.run(undefined,this);

    // reset the initializers and finalizers
    this._initializerCallbacks.reset();
    this._finalizerCallbacks.reset();

    Marionette.triggerMethod.call(this, "stop");
  }
1312018
function Module (rawModule, runtime) {
  this.runtime = runtime;
  // Store some children item
  this._children = Object.create(null);
  // Store the origin module object which passed by programmer
  this._rawModule = rawModule;
  var rawState = rawModule.state;

  // Store the origin module's state
  this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
}
362957
def readmodule(module, path=None):
    ''''''

    res = {}
    for key, value in _readmodule(module, path or []).items():
        if isinstance(value, Class):
            res[key] = value
    return res
318924
function _initModulesOnElement(enabledElement) {
  const modules = store.modules;

  Object.keys(modules).forEach(function(key) {
    if (typeof modules[key].enabledElementCallback === 'function') {
      modules[key].enabledElementCallback(enabledElement);
    }
  });
}
1336747
public final Iterator<String> loadedModuleRoles() {
        String [] names = m_moduleContext.getBeanNamesForType(Module.class,false,true);
        return Arrays.asList(names).iterator();
    }
1161404
private function loadModules()
    {
        /** @var ModuleRepository $repo */
        $repo = $this->getContainer()->get('module_repository');

        /** @var Module $module */
        foreach ($repo->getAll() as $module) {
            $moduleClass = $module->getClass();
            new $moduleClass($this);
        }
    }
954550
function (e) {
		currentProgram = undefined;
		currentModule = {
			name: null,
			resource: getResourceName(e.filename),
			module: getModuleName(getResourceName(e.filename)),
			localNames: Object.create(null)
		};
	}
802021
public CarbonModuleData getModuleData()
	{
		final Element e = element.getChild(MODULE_DATA_ELEMENT);

		if (e != null)
			return new CarbonModuleData(e);
		else
			return null;
	}
198884
def _getModules(self):
        
        modules = {}
        modulesPath = os.path.join("application", "module")
        moduleList = os.listdir(modulesPath)

        for moduleName in moduleList:
            modulePath = os.path.join(modulesPath, moduleName, "module.py")
            if not os.path.isfile(modulePath):
                continue

            # importing module
            moduleSpec = importlib.util.spec_from_file_location(
                moduleName,
                modulePath
            )
            module = importlib.util.module_from_spec(moduleSpec)
            moduleSpec.loader.exec_module(module)

            # initializing module
            moduleInstance = module.Module(self)
            modules[moduleName] = moduleInstance

        return modules