Here you can find the source of getConstructor(String string, Class... types)
public static Constructor getConstructor(String string, Class... types)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Constructor; public class Main { public static Constructor getConstructor(String string, Class... types) { try {//ww w . j av a 2 s . c om Class clazz = Class.forName(string); Constructor constructor = clazz.getDeclaredConstructor(types); constructor.setAccessible(true); return constructor; } catch (Exception ex) { } return null; } }