public static < T > T createObject ( final Class < T > clazz , final Object [ ] args , final Map < String , Object > vars ) throws NoSuchConstructorException , AmbiguousConstructorException , ReflectiveOperationException { return invokeSetters ( findConstructor ( clazz , args ) . newInstance ( args ) , vars ) ; }
Create an object of the given type using a constructor that matches the supplied arguments and invoke the setters with the supplied variables .