@Test public void createClass() throws Exception { DefaultObjectFactory defaultObjectFactory = new DefaultObjectFactory(); TestClass testClass = defaultObjectFactory.create(TestClass.class, Arrays.<Class<?>>asList(String.class, Integer.class), Arrays.<Object>asList("foo", 0)); Assert.assertEquals("myInteger didn't match expected", (Integer) 0, testClass.myInteger); Assert.assertEquals("myString didn't match expected", "foo", testClass.myString); }
@Override public <T> T create(Class<T> type) { return create(type, null, null); }
DefaultObjectFactory implements ObjectFactory, Serializable { @Override public <T> T create(Class<T> type) { return create(type, null, null); } }
DefaultObjectFactory implements ObjectFactory, Serializable { @Override public <T> T create(Class<T> type) { return create(type, null, null); }  }
DefaultObjectFactory implements ObjectFactory, Serializable { @Override public <T> T create(Class<T> type) { return create(type, null, null); }  @Override T create(Class<T> type); @SuppressWarnings("unchecked") @Override T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs); @Override void setProperties(Properties properties); @Override boolean isCollection(Class<T> type); }
DefaultObjectFactory implements ObjectFactory, Serializable { @Override public <T> T create(Class<T> type) { return create(type, null, null); }  @Override T create(Class<T> type); @SuppressWarnings("unchecked") @Override T create(Class<T> type, List<Class<?>> constructorArgTypes, List<Object> constructorArgs); @Override void setProperties(Properties properties); @Override boolean isCollection(Class<T> type);  }