static Constructor findConstructor(Class objectClass, Object[] params) {

        // System.out.println("Finding Constructor in class " + objectClass);
        Constructor[] methods = objectClass.getConstructors();

        methodLoop:
        for (Constructor method : methods) {

            Class<?>[] parameterTypes = method.getParameterTypes();

            if (parameterTypes.length == params.length) {
                // System.out.println("Right number of params!");
                for (int i = 0; i < parameterTypes.length; i++) {

                    // System.out.println(parameterTypes[i].getSimpleName() + " " + params[i].getClass().getSimpleName());
                    //check for primitive
                    if (parameterTypes[i].isPrimitive()) {
                        // System.out.println("This is a primitive");
                        if (!isPrimitiveEquivalent(parameterTypes[i], params[i].getClass())) {
                            continue methodLoop;
                        }
                    } else {
                        if (!parameterTypes[i].isAssignableFrom(params[i].getClass())) {
                            continue methodLoop;
                        }
                    }
                }
                // System.out.println("All params match!");
                return method;

            }
        }

        // System.out.println("No methods matched");
        return null;
    }