protected Constructor resolveConstructor ( final Class < ? > objectType , final Class ... parameterTypes ) { try { return objectType . getConstructor ( parameterTypes ) ; } catch ( NoSuchMethodException e ) { if ( ! ArrayUtils . isEmpty ( parameterTypes ) ) { Constructor constructor = resolveCompatibleConstructor ( objectType , parameterTypes ) ; // if the "compatible" constructor is null, resolve to finding the public, default no-arg constructor return ( constructor != null ? constructor : resolveConstructor ( objectType ) ) ; } throw new NoSuchConstructorException ( String . format ( "Failed to find a constructor with signature (%1$s) in Class (%2$s)" , from ( parameterTypes ) . toString ( ) , objectType . getName ( ) ) , e ) ; } }
Resolves the Class constructor with the given signature as determined by the parameter types .