java.lang.Object
org.eclipse.yasson.internal.model.customization.PropertyOrdering

public class PropertyOrdering extends Object
Order properties in bean object. JsonbPropertyOrder have always precedence. If configured with JsonbConfig provided property order strategy will be used.
  • Constructor Details

    • PropertyOrdering

      public PropertyOrdering(Consumer<List<PropertyModel>> propertyOrderStrategy)
      Creates a new instance.
      Parameters:
      propertyOrderStrategy - Property order strategy. Must be not null.
  • Method Details

    • orderProperties

      public List<PropertyModel> orderProperties(List<PropertyModel> properties, ClassModel classModel)
      Sorts class properties either, by class JsonbPropertyOrder annotation, or by PropertyOrderStrategy if set in JsonbConfig.
      Parameters:
      properties - Properties to sort.
      classModel - Class model.
      Returns:
      Sorted list of properties.