Binds a module.

@param module the module
11141
@Bind(optional = true, aggregate = true)
    public synchronized void bindModule(Module module) {
        register(module);
    }
693169
@SuppressWarnings("deprecation")
    private void bindEnvironment() {
        bind(Bootstrap.class).toInstance(bootstrap());
        bind(Environment.class).toInstance(environment());
        install(new ConfigBindingModule(configuration(), configurationTree(),
                context.option(BindConfigurationInterfaces)));
    }
991686
def install(self, binder, module):
        """"""
        ModuleAdapter(module, self._injector).configure(binder)
679005
public Governator addModules(Module ... modules) {
        if (modules != null) {
            this.modules.addAll(Arrays.asList(modules));
        }
        return this;
    }
1368274
public static JavaModule of(Object module) {
        if (!JavaType.MODULE.isInstance(module)) {
            throw new IllegalArgumentException("Not a Java module: " + module);
        }
        return new JavaModule(module);
    }
1058594
public void editModule(String moduleName) {

        CmsModule module = OpenCms.getModuleManager().getModule(moduleName);
        editModule(
            module,
            false,
            CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_TITLE_EDIT_MODULE_1, module.getName()),
            this::reload);
    }
512838
public function register(DynamicModule $module)
    {
        if(!is_null($module) && ! empty($module->getModule()) ) {

            self::getRegistry()->set($module->getModule(), $module->toArray());

            return true;
        }
        return false;
    }
169634
public function setModule($value) {
		if (is_object($value)) {
			$this->module = get_class($value);
		}else {
			$this->module = (string) $value;
		}
	}
24096
public function setModule($module)
    {
        $layout = $this->getViewModel();
        $layout->setModule((string) $module);

        return $this;
    }
211427
@Override
    public void register(Module module) {
        if (module == null) {
            return;
        }
        LOGGER.info("Adding JSON module {}", module.getModuleName());
        synchronized (lock) {
            modules.add(module);
            rebuildMappers();
        }
    }
341840
public static Binder binder(Object module) {
        if (module instanceof AbstractModule) {
            try {
                Method method = AbstractModule.class.getDeclaredMethod("binder");
                if (!method.isAccessible()) {
                    method.setAccessible(true);
                }
                return (Binder) method.invoke(module);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        } else {
            throw new IllegalArgumentException("Module must be an instance of AbstractModule");
        }
    }
296391
public static Module unserializeModule(final String module) throws IOException {
        final ObjectMapper mapper = new ObjectMapper();
        mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
        return mapper.readValue(module, Module.class);
    }
380522
public void init(ObjectMapper objectMapper) {
		if (!initialized) {
			this.initialized = true;
			this.objectMapper = objectMapper;
			this.objectMapper.registerModules(getJacksonModules());

			applyRepositoryRegistration(resourceRegistry);

			for (Module module : modules) {
				if (module instanceof InitializingModule) {
					((InitializingModule) module).init();
				}
			}
		}
	}
662822
@Override
    public void bindJavaModule(String name, EJBBinding bindingObject) {
        ejbJavaColonHelper.addModuleBinding(moduleMetaData, name, bindingObject);
    }
919490
public function setModule($module) {
        if (!is_string($module) || empty($module)) {
            $errMessage = "The module value must be a string and not be empty";
            throw new \InvalidArgumentException($errMessage, GeneralErrors::VALUE_IS_NOT_OF_EXPECTED_TYPE);
        }

        $this->module = $module;
    }
312080
public void initialize(CmsModule module) {

        boolean empty = true;
        Set<String> resTypeNames = Sets.newHashSet();
        for (I_CmsResourceType type : module.getResourceTypes()) {
            m_resourceTypes.addComponent(formatResourceType(type));
            resTypeNames.add(type.getTypeName());
            empty = false;
        }
        if (empty) {
            m_resourceTypes.addComponent(
                new Label(CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_NO_RESOURCE_TYPES_0)));
        }
        empty = true;
        for (CmsExplorerTypeSettings expType : module.getExplorerTypes()) {
            if (resTypeNames.contains(expType.getName())) {
                continue;
            }
            m_explorerTypes.addComponent(formatExplorerType(expType));
            empty = false;
        }

        if (empty) {
            m_explorerTypesPanel.setVisible(false);
        }
    }
10050
public static void registerConstructor(String module, String classname, IObjectConstructor constructor) {
		objectConstructors.put(module + "." + classname, constructor);
	}