com.atlassian.plugin.hostcontainer
Interface HostContainer

All Known Implementing Classes:
DefaultHostContainer, SimpleConstructorHostContainer

public interface HostContainer

Interface into the host application's dependency injection system. The implementation will be expected to be able to instantiate modules and possibly ModuleDescriptor instances via constructor injection, matching the constructor with the largest number of arguments first.

Since:
2.2.0

Method Summary
<T> T
create(java.lang.Class<T> moduleClass)
          Constructs an instance of a class, matching the constructor with the largest number of arguments first, and autowires as appropriate.
 

Method Detail

create

<T> T create(java.lang.Class<T> moduleClass)
         throws java.lang.IllegalArgumentException
Constructs an instance of a class, matching the constructor with the largest number of arguments first, and autowires as appropriate. Actual method of autowiring may vary between implementations, though all should support constructor injection.

Parameters:
moduleClass - The class
Returns:
An instance of the passed class
Throws:
java.lang.IllegalArgumentException - If unable to instantiate the class


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.