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 try {
18 return moduleClass.newInstance();
19 } catch (InstantiationException e) {
20 throw new IllegalArgumentException("Unable to instantiate constructor", e);
21 } catch (IllegalAccessException e) {
22 throw new IllegalArgumentException("Unable to access constructor", e);
23 }
24 }
25 }