Here you can find the source of newInstance(Constructor
public static <T> T newInstance(Constructor<T> ctor, Object... params)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class Main { /** Checked exceptions are LAME. */ public static <T> T newInstance(Constructor<T> ctor, Object... params) { try {/*from w w w .j av a 2 s . c o m*/ return ctor.newInstance(params); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); } } }