Here you can find the source of getConstructor(Class> clazz, Object[] parameters)
public static Constructor<?> getConstructor(Class<?> clazz, Object[] parameters) throws NoSuchMethodException
//package com.java2s; //License from project: Apache License import java.lang.reflect.*; public class Main { public static Constructor<?> getConstructor(Class<?> clazz, Object[] parameters) throws NoSuchMethodException { Class<?>[] parameterClasses = new Class<?>[parameters.length]; for (int i = 0; i < parameters.length; i++) { parameterClasses[i] = parameters[i] == null ? null : parameters[i].getClass(); }/*w ww . j a v a 2 s . c om*/ return clazz.getConstructor(parameterClasses); } }