getFieldsInSerializationOrder function

Iterable<NamedType> getFieldsInSerializationOrder(
  1. Class classDefinition
)

Returns an ordered list of fields to provide consistent serialization order.

Implementation

Iterable<NamedType> getFieldsInSerializationOrder(Class classDefinition) {
  // This returns the fields in the order they are declared in the pigeon file.
  return classDefinition.fields;
}