@Test public void createArrayList() throws Exception { DefaultObjectFactory defaultObjectFactory = new DefaultObjectFactory(); List list = defaultObjectFactory.create(List.class); Assert.assertTrue(" list should be ArrayList", list instanceof ArrayList); Collection collection = defaultObjectFactory.create(Collection.class); Assert.assertTrue(" collection should be ArrayList", collection instanceof ArrayList); Iterable iterable = defaultObjectFactory.create(Iterable.class); Assert.assertTrue(" iterable should be ArrayList", iterable instanceof ArrayList); }
@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);  }