Here you can find the source of newInstance(Class
private static <T> T newInstance(Class<T> beanClass)
//package com.java2s; //License from project: Apache License public class Main { private static <T> T newInstance(Class<T> beanClass) { T instance = null;/* w w w . ja v a2 s.com*/ try { instance = beanClass.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new IllegalArgumentException("create instance of " + beanClass.getSimpleName() + "failed. WTF?", e); } return instance; } }