@Test public void newInstanceClient() throws Exception { AwsClientFactory factory = new AwsClientFactory(config); AmazonEC2Client ec2 = factory.newInstance(AmazonEC2Client.class); Assert.assertNotNull(ec2); }
public <T> T newInstance(Class<T> cls) { return newInstance(getDefaultName(cls), cls); }
AwsClientFactory implements AutoCloseable { public <T> T newInstance(Class<T> cls) { return newInstance(getDefaultName(cls), cls); } }
AwsClientFactory implements AutoCloseable { public <T> T newInstance(Class<T> cls) { return newInstance(getDefaultName(cls), cls); } @Inject  AwsClientFactory(Config config); }
AwsClientFactory implements AutoCloseable { public <T> T newInstance(Class<T> cls) { return newInstance(getDefaultName(cls), cls); } @Inject  AwsClientFactory(Config config); T newInstance(Class<T> cls); T newInstance(String name, Class<T> cls); T newInstance(Class<T> cls, String accountId); @SuppressWarnings("unchecked") T newInstance(String name, Class<T> cls, String accountId); T getInstance(Class<T> cls); T getInstance(String name, Class<T> cls); T getInstance(Class<T> cls, String accountId); @SuppressWarnings("unchecked") T getInstance(String name, Class<T> cls, String accountId); @Override void close(); }
AwsClientFactory implements AutoCloseable { public <T> T newInstance(Class<T> cls) { return newInstance(getDefaultName(cls), cls); } @Inject  AwsClientFactory(Config config); T newInstance(Class<T> cls); T newInstance(String name, Class<T> cls); T newInstance(Class<T> cls, String accountId); @SuppressWarnings("unchecked") T newInstance(String name, Class<T> cls, String accountId); T getInstance(Class<T> cls); T getInstance(String name, Class<T> cls); T getInstance(Class<T> cls, String accountId); @SuppressWarnings("unchecked") T getInstance(String name, Class<T> cls, String accountId); @Override void close();  }