code: public void addFieldDefinition(FieldDefinition fieldDef) {
          // Assure field name is unique and add the definition to the map.
          Utils.require(!Utils.isEmpty(fieldDef.getName()), "Field name is required");
          Utils.require(!m_fieldDefMap.containsKey(fieldDef.getName()),
                        "Field names must be unique: " + fieldDef.getName());
          m_fieldDefMap.put(fieldDef.getName(), fieldDef);
          fieldDef.setTableDefinition(this);
  
          // Recurse to nested fields, if any.
          if (fieldDef.isGroupField()) {
              for (FieldDefinition nestedFieldDef : fieldDef.getNestedFields()) {
                  addFieldDefinition(nestedFieldDef);
              }
          }
      }
docs: Add the given {@link FieldDefinition} object to this table's list of fields. This
  method recursively validates and adds the given field and its nested fields, if
  any, to this table.
  
  @param fieldDef  New {@link FieldDefinition} to add to this table.