public Object invokeConstructor(Object[] arguments) {

        // TODO This is the only area where this MetaClass needs to do some interception because Groovy's current
        // MetaClass uses hard coded references to the java.lang.reflect.Constructor class so you can't simply
        // inject Constructor like you can do properties, methods and fields. When Groovy's MetaClassImpl is
        // refactored we can fix this
        Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
        MetaMethod method = pickMethod(GROOVY_CONSTRUCTOR, argClasses);
        if (method != null && method.getParameterTypes().length == arguments.length) {
            return method.invoke(theClass, arguments);
        }
        return super.invokeConstructor(arguments);
    }
public Object invokeConstructor ( Object [ ] arguments ) { Class [ ] argClasses = MetaClassHelper . convertToTypeArray ( arguments ) ; MetaMethod method = pickMethod ( GROOVY_CONSTRUCTOR , argClasses ) ; if ( method != null && method . getParameterTypes ( ) . length == arguments . length ) { return method . invoke ( theClass , arguments ) ; } return super . invokeConstructor ( arguments ) ; }
/* (non-Javadoc)
@see groovy.lang.MetaClassImpl#invokeConstructor(java.lang.Object[])