Java Reflection Constructor Get getConstructor(Class clazz, Class... parameterTypes)

Here you can find the source of getConstructor(Class clazz, Class... parameterTypes)

Description

get Constructor

License

Open Source License

Declaration

public static Constructor<?> getConstructor(Class<?> clazz, Class<?>... parameterTypes) 

Method Source Code

//package com.java2s;

import java.lang.reflect.*;

public class Main {

    public static Constructor<?> getConstructor(Class<?> clazz, Class<?>... parameterTypes) {
        try {//from  w w  w .  j ava2 s.  com
            return clazz.getDeclaredConstructor(parameterTypes);
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. getConstructor(Class type, Class[] argTypes)
  2. getConstructor(Class c, Class[] args)
  3. getConstructor(Class clazz, boolean declared, Class... args)
  4. getConstructor(Class clazz, Class... args)
  5. getConstructor(Class clazz, Class... args)
  6. getConstructor(Class clazz, Class... parameterTypes)
  7. getConstructor(Class clazz, Class... params)
  8. getConstructor(Class clazz, Class... params)
  9. getConstructor(Class clazz, Object... args)