@Test(expected = RibbonProxyException.class) public void testNewInstanceForFailure() throws Exception { Utils.newInstance(InputStream.class); }
public static <T> T newInstance(Class<T> aClass) { try { return aClass.newInstance(); } catch (Exception e) { throw new RibbonProxyException("Cannot instantiate object from class " + aClass, e); } }
Utils { public static <T> T newInstance(Class<T> aClass) { try { return aClass.newInstance(); } catch (Exception e) { throw new RibbonProxyException("Cannot instantiate object from class " + aClass, e); } } }
Utils { public static <T> T newInstance(Class<T> aClass) { try { return aClass.newInstance(); } catch (Exception e) { throw new RibbonProxyException("Cannot instantiate object from class " + aClass, e); } } private  Utils(); }
Utils { public static <T> T newInstance(Class<T> aClass) { try { return aClass.newInstance(); } catch (Exception e) { throw new RibbonProxyException("Cannot instantiate object from class " + aClass, e); } } private  Utils(); static Method methodByName(Class<T> aClass, String name); static Object executeOnInstance(Object object, Method method, Object[] args); static T newInstance(Class<T> aClass); }
Utils { public static <T> T newInstance(Class<T> aClass) { try { return aClass.newInstance(); } catch (Exception e) { throw new RibbonProxyException("Cannot instantiate object from class " + aClass, e); } } private  Utils(); static Method methodByName(Class<T> aClass, String name); static Object executeOnInstance(Object object, Method method, Object[] args); static T newInstance(Class<T> aClass);  }