@Test public void testInstantiateWithArgs() { Number n = ClassUtils.loadInstanceOf(Integer.class.getName(), Number.class, new Class<?>[]{int.class}, new Object[]{3}); assertEquals(3, n.intValue()); }
public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); }
ClassUtils { public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); } }
ClassUtils { public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); } private  ClassUtils(); }
ClassUtils { public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); } private  ClassUtils(); static T loadInstanceOf(Class<T> clazz); static T loadInstanceOf(Class<T> clazz, Class<?>[] constructorTypes, Object[] constructorArgs); static T loadInstanceOf(String implClassName, Class<T> superClass); static T loadInstanceOf(String implClassName,
                                     Class<T> superClass,
                                     Class<?>[] constructorTypes,
                                     Object[] constructorArgs); static boolean classExists(String implClassName); static Field loadField(Class<?> clazz, String fieldName); }
ClassUtils { public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); } private  ClassUtils(); static T loadInstanceOf(Class<T> clazz); static T loadInstanceOf(Class<T> clazz, Class<?>[] constructorTypes, Object[] constructorArgs); static T loadInstanceOf(String implClassName, Class<T> superClass); static T loadInstanceOf(String implClassName,
                                     Class<T> superClass,
                                     Class<?>[] constructorTypes,
                                     Object[] constructorArgs); static boolean classExists(String implClassName); static Field loadField(Class<?> clazz, String fieldName);  }