private static String validateWrapped(DataType type, String variable, String elements, int ind) {
        String wrappedValidation = validateArgument(type, variable + "$", ind + 2);
        if (wrappedValidation.isBlank()) return "";
        return ind(ind) + "if (" + variable + " != null) {\n" +
               ind(ind+1) + "for (" + toJavaType(type) + " " + variable + "$ : " + elements + ") {\n" +
               wrappedValidation +
               ind(ind+1) + "}\n" +
               ind(ind) + "}\n";
    }
Exports this set of fields with getters and setters
@param spanTrees If true, include a reference to the list of span trees for the string fields
vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java