code: public JField []getFields()
    {
      ArrayList<JField> fieldList = new ArrayList<JField>();
  
      getFields(fieldList);
  
      JField []fields = new JField[fieldList.size()];
      fieldList.toArray(fields);
  
      return fields;
    }
docs: Returns the array of fields.