class QueryFactory {

    static void validateSimpleFunctionGenericTypes(Class<?>[] typeArgs, Class<?> subType) {
        if (typeArgs == null) {
            throw new IllegalStateException("Could not resolve any generic type information from the given " +
                    "function of type: " + subType.getName() + ". " + GENERIC_TYPE_RESOLUTION_FAILURE_MESSAGE);
        }
        if (typeArgs.length != 2 || typeArgs[0] == TypeResolver.Unknown.class || typeArgs[1] == TypeResolver.Unknown.class) {
            throw new IllegalStateException("Could not resolve sufficient generic type information from the given " +
                    "function of type: " + subType.getName() + ", resolved: " + Arrays.toString(typeArgs) + ". " +
                    GENERIC_TYPE_RESOLUTION_FAILURE_MESSAGE);
        }
    }

      QueryFactory();

}