com.atlassian.plugin.hostcontainer
Class SimpleConstructorHostContainer
java.lang.Object
com.atlassian.plugin.hostcontainer.SimpleConstructorHostContainer
- All Implemented Interfaces:
- HostContainer
public class SimpleConstructorHostContainer
- extends Object
- implements HostContainer
Constructs module instances, matching the constructor with the largest number of arguments first. The objects to
pass to the constructor are retrieved from the passed map of classes and objects. The classes are matched on an
exact class match.
- Since:
- 2.2.0
|
Method Summary |
|
create(Class<T> moduleClass)
Creates a class instance, performing dependency injection using the initialised context map |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleConstructorHostContainer
public SimpleConstructorHostContainer(Map<Class<?>,Object> context)
create
public <T> T create(Class<T> moduleClass)
throws IllegalArgumentException
- Creates a class instance, performing dependency injection using the initialised context map
- Specified by:
create in interface HostContainer
- Parameters:
moduleClass - The target object class
- Returns:
- The instance
- Throws:
IllegalArgumentException - Wraps any exceptions thrown during the constructor call
Copyright © 2011 Atlassian. All Rights Reserved.