1 package com.atlassian.plugin.hostcontainer;
2
3
4
5
6
7
8 public class DefaultHostContainer implements HostContainer
9 {
10
11
12
13
14
15
16 public <T> T create(Class<T> moduleClass) throws IllegalArgumentException
17 {
18 try
19 {
20 return moduleClass.newInstance();
21 }
22 catch (InstantiationException e)
23 {
24 throw new IllegalArgumentException("Unable to instantiate constructor", e);
25 }
26 catch (IllegalAccessException e)
27 {
28 throw new IllegalArgumentException("Unable to access constructor", e);
29 }
30 }
31 }