@Test public void testInstanciationWithTypesAndParams() { List<Class<?>> paramTypes = new ArrayList<Class<?>>(); paramTypes.add(char[].class); paramTypes.add(Integer.TYPE); paramTypes.add(Integer.TYPE); List<Object> params = new ArrayList<Object>(); params.add("Say yes!".toCharArray()); params.add(4); params.add(3); Object obj = ObjectFactory.createObject("java.lang.String", paramTypes, params); assertNotNull(obj); assertEquals(obj.getClass(), (new String()).getClass()); assertEquals(obj, "yes"); }
public static Object createObject(String qualifiedName) { return createObject(qualifiedName, new ArrayList<>(), new ArrayList<>()); }
ObjectFactory { public static Object createObject(String qualifiedName) { return createObject(qualifiedName, new ArrayList<>(), new ArrayList<>()); } }
ObjectFactory { public static Object createObject(String qualifiedName) { return createObject(qualifiedName, new ArrayList<>(), new ArrayList<>()); } protected  ObjectFactory(); }
ObjectFactory { public static Object createObject(String qualifiedName) { return createObject(qualifiedName, new ArrayList<>(), new ArrayList<>()); } protected  ObjectFactory(); static Object createObject(String qualifiedName); static Object createObject(String qualifiedName, List<Object> params); static Object createObject(String qualifiedName,  List<Class<?>> paramTypes, List<Object> params); }
ObjectFactory { public static Object createObject(String qualifiedName) { return createObject(qualifiedName, new ArrayList<>(), new ArrayList<>()); } protected  ObjectFactory(); static Object createObject(String qualifiedName); static Object createObject(String qualifiedName, List<Object> params); static Object createObject(String qualifiedName,  List<Class<?>> paramTypes, List<Object> params);  }