com.atlassian.plugin.module
Interface ModuleFactory
- All Known Subinterfaces:
- PrefixModuleFactory
- All Known Implementing Classes:
- BeanPrefixModuleFactory, ClassPrefixModuleFactory, HostContainerLegacyAdaptor, LegacyModuleFactory, PrefixDelegatingModuleFactory
public interface ModuleFactory
The ModuleFactory creates the module class of a ModuleDescriptor.
The ModuleFactory is injected into the AbstractModuleDescriptor and encapsulates the different
strategies how the module class can be created.
- Since:
- 2.5.0
LEGACY_MODULE_FACTORY
static final ModuleFactory LEGACY_MODULE_FACTORY
- Returns the module class. The module class name can contain a prefix. The delimiter of the prefix and the class name is ':'.
E.g.: 'bean:httpServletBean'. Which prefixes are supported depends on the registered
com.atlassian.plugin.module.ModuleCreator.
createModule
<T> T createModule(java.lang.String name,
ModuleDescriptor<T> moduleDescriptor)
throws PluginParseException
- Creates the module instance. The module class name can contain a prefix. The delimiter of the prefix and the class name is ':'.
E.g.: 'bean:httpServletBean'. Which prefixes are supported depends on the registered
com.atlassian.plugin.module.ModuleCreator.
The prefix is case in-sensitive.
- Parameters:
name - module class name, can contain a prefix followed by ":" and the class name. Cannot be null
If no prefix provided a default behaviour is assumed how to create the module class.moduleDescriptor - the ModuleDescriptor. Cannot be null
- Returns:
- an instantiated object of the module class.
- Throws:
PluginParseException - If it failed to create the object.
Copyright © 2013 Atlassian. All Rights Reserved.