Here you can find the source of getConstructors(Class> clazz)
public static List<Constructor<?>> getConstructors(Class<?> clazz)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; public class Main { public static List<Constructor<?>> getConstructors(Class<?> clazz) { List<Constructor<?>> lst = new ArrayList<Constructor<?>>(); Constructor<?>[] cotrs = clazz.getDeclaredConstructors(); for (Constructor<?> c : cotrs) { int im = c.getModifiers(); if (!Modifier.isPublic(im)) continue; lst.add(c);/* w w w . j a v a 2 s. c o m*/ } return lst; } }