Here you can find the source of getConstructor(Class
public static <T> Constructor<T> getConstructor(Class<T> clazz) throws SecurityException, NoSuchMethodException
//package com.java2s; //License from project: Apache License import java.lang.reflect.Constructor; public class Main { public static Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0]; /**/*www .j ava 2 s. c o m*/ * Returns the empty argument constructor of the class. */ public static <T> Constructor<T> getConstructor(Class<T> clazz) throws SecurityException, NoSuchMethodException { if (clazz == null) { throw new IllegalArgumentException("class cannot be null"); } Constructor<T> cons = clazz.getConstructor(EMPTY_CLASS_ARRAY); cons.setAccessible(true); return cons; } }