Get the names of all fields that will be serialized.

 @api private

 @example Get all the field names.
   document.send(:field_names)

 @return [ Array<String> ] The names of the fields.

 @since 3.0.0
550018
def field_names(options)
      names = (as_attributes.keys + attribute_names).uniq.sort

      only = Array.wrap(options[:only]).map(&:to_s)
      except = Array.wrap(options[:except]).map(&:to_s)
      except |= ['_type'] unless Mongoid.include_type_for_serialization

      if !only.empty?
        names &= only
      elsif !except.empty?
        names -= except
      end
      names
    end
1276951
def get_displayable_field_names(self):
        
        return [
            f.name
            for f in self.model._meta.get_fields()
            if not f.one_to_many
        ]
773009
def derive_fields(self):
        
        fields = []
        if self.fields:
            fields.append(self.fields)

        return fields
181609
def get_fields(self):
        
        all_fields = self.get_all_fields()
        if self.dynamic is False:
            return all_fields

        if self.id_only():
            return {}

        serializer_fields = copy.deepcopy(all_fields)
        request_fields = self.request_fields
        deferred = self._get_deferred_field_names(serializer_fields)

        # apply request overrides
        if request_fields:
            for name, include in six.iteritems(request_fields):
                if name not in serializer_fields:
                    raise exceptions.ParseError(
                        '"%s" is not a valid field name for "%s".' %
                        (name, self.get_name())
                    )
                if include is not False and name in deferred:
                    deferred.remove(name)
                elif include is False:
                    deferred.add(name)

        for name in deferred:
            serializer_fields.pop(name)

        # Set read_only flags based on read_only_fields meta list.
        # Here to cover DynamicFields not covered by DRF.
        ro_fields = getattr(self.Meta, 'read_only_fields', [])
        self.flag_fields(serializer_fields, ro_fields, 'read_only', True)

        pw_fields = getattr(self.Meta, 'untrimmed_fields', [])
        self.flag_fields(
            serializer_fields,
            pw_fields,
            'trim_whitespace',
            False,
        )

        # Toggle read_only flags for immutable fields.
        # Note: This overrides `read_only` if both are set, to allow
        #       inferred DRF fields to be made immutable.
        immutable_field_names = self._get_flagged_field_names(
            serializer_fields,
            'immutable'
        )
        self.flag_fields(
            serializer_fields,
            immutable_field_names,
            'read_only',
            value=False if self.get_request_method() == 'POST' else True
        )

        return serializer_fields
1004589
public JField []getFields()
  {
    ArrayList<JField> fieldList = new ArrayList<JField>();

    getFields(fieldList);

    JField []fields = new JField[fieldList.size()];
    fieldList.toArray(fields);

    return fields;
  }
175009
def all_fields(self):
        
        fields = []
        if self.parent_type:
            fields.extend(self.parent_type.all_fields)
        fields.extend([f for f in self.fields])
        return fields
215856
def _get_simple_fields(self):
        
        fields = []
        for field_name in self.cls._fields:
            field = self.cls.get_field(field_name)
            if not isinstance(field, MultiValuesField):
                fields.append(field_name)
        return fields
913805
def serialize_fields
      serialized = {}
      post_fields.visibles.roots.order('position ASC').each do |post_field|
        serialized[post_field.key] = post_field.serialize_base
      end
      serialized
    end
534063
def fieldnames(self):
        ''' 
        '''
        if not self._fields:
            if self._item_class is not None:
                for m in inspect.getmembers(self._item_class):
                    if m[0] == 'fields' and isinstance(m[1], dict):
                        self._fields = m[1]
                if not self._fields:
                    raise RuntimeError('Unknown item type, no fields: %s' % self._item_class)
            else:
                raise RuntimeError('Item class is not defined, %s' % self._item_class)
        return self._fields.keys()
1009516
def serialize_attributes
    attr_hash = {}
    @attributes.each_pair do |name,value|
      attr_hash[name] = serialize_attribute(name,value)
    end
    attr_hash[:id] = serialize_id unless new?
    attr_hash
  end
445462
public FieldInfo[] getFields() {
        FieldInfo[] fields = new FieldInfo[mFields.size()];
        return mFields.toArray(fields);
    }
282899
def _all_fields(self):
        
        if (
            not settings.ENABLE_FIELDS_CACHE or
            not self.ENABLE_FIELDS_CACHE or
            self.__class__ not in FIELDS_CACHE
        ):
            all_fields = super(
                WithDynamicSerializerMixin,
                self
            ).get_fields()

            if (
                settings.ENABLE_FIELDS_CACHE and
                self.ENABLE_FIELDS_CACHE
            ):
                FIELDS_CACHE[self.__class__] = all_fields
        else:
            all_fields = copy.copy(FIELDS_CACHE[self.__class__])
            for k, field in six.iteritems(all_fields):
                if hasattr(field, 'reset'):
                    field.reset()

        for k, field in six.iteritems(all_fields):
            field.field_name = k
            field.parent = self

        return all_fields
120490
def get_fields_class(self, class_name):
        
        l = []
        for i in self.get_classes():
            for j in i.get_fields():
                if class_name == j.get_class_name():
                    l.append(j)

        return l
33135
def printable_fields
      raw_fields.map do |field|
        field.is_a?(Array) ? field.last : field
      end
    end
912516
def fields_from_names(fields, names=None):
    

    if names is None:
        return fields
    if isinstance(names, string_types):
        names = [names]
    aliases_to_names = aliases_from_fields(fields)
    names_to_aliases = dict(zip(aliases_to_names.values(),
        aliases_to_names.keys()))
    outfields = {}
    for name in names:
        try:
            outfields[name] = fields[name]
        except KeyError:
            if name in aliases_to_names:
                key = (name, aliases_to_names[name])
            elif name in names_to_aliases:
                key = (names_to_aliases[name], name)
            else:
                raise KeyError('default fields has no field %s' % name)
            outfields[key] = fields[key]
    return outfields
543686
@JSONField(serialize = false)
    public String[] getXhashNames() {
        List<Obj> xhash = getXhash();
        String[] xhashNames = new String[xhash.size()];
        for (int i = 0; i < xhash.size(); i++) {
            xhashNames[i] = xhash.get(i).getName();
        }
        return xhashNames;
    }
795221
def serialize_tags
      serialized = {}
      tags.each do |tag|
        serialized[tag.id] = tag.serialize_base
      end
      serialized
    end