com.atlassian.plugin.module
Class LegacyModuleFactory

java.lang.Object
  extended by com.atlassian.plugin.module.LegacyModuleFactory
All Implemented Interfaces:
ModuleFactory
Direct Known Subclasses:
HostContainerLegacyAdaptor

public class LegacyModuleFactory
extends Object
implements ModuleFactory

Legacy module factory that provides module classes for descriptors that aren't using an injected ModuleFactory

Since:
2.5.0

Field Summary
 
Fields inherited from interface com.atlassian.plugin.module.ModuleFactory
LEGACY_MODULE_FACTORY
 
Constructor Summary
LegacyModuleFactory()
           
 
Method Summary
<T> T
createModule(String name, ModuleDescriptor<T> moduleDescriptor)
          Creates the module instance.
<T> Class<T>
getModuleClass(String name, ModuleDescriptor<T> moduleDescriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyModuleFactory

public LegacyModuleFactory()
Method Detail

createModule

public <T> T createModule(String name,
                          ModuleDescriptor<T> moduleDescriptor)
               throws PluginParseException
Description copied from interface: ModuleFactory
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.

Specified by:
createModule in interface ModuleFactory
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.

getModuleClass

public <T> Class<T> getModuleClass(String name,
                                   ModuleDescriptor<T> moduleDescriptor)
                        throws ModuleClassNotFoundException
Throws:
ModuleClassNotFoundException


Copyright © 2015 Atlassian. All rights reserved.