Class PropertyOrdering
- java.lang.Object
-
- org.eclipse.yasson.internal.model.customization.PropertyOrdering
-
public class PropertyOrdering extends java.lang.ObjectOrder properties in bean object.JsonbPropertyOrderhave always precedence. If configured withJsonbConfigprovided property order strategy will be used.
-
-
Constructor Summary
Constructors Constructor Description PropertyOrdering(java.util.function.Consumer<java.util.List<PropertyModel>> propertyOrderStrategy)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<PropertyModel>orderProperties(java.util.List<PropertyModel> properties, ClassModel classModel)Sorts class properties either, by classJsonbPropertyOrderannotation, or byPropertyOrderStrategyif set inJsonbConfig.
-
-
-
Constructor Detail
-
PropertyOrdering
public PropertyOrdering(java.util.function.Consumer<java.util.List<PropertyModel>> propertyOrderStrategy)
Creates a new instance.- Parameters:
propertyOrderStrategy- Property order strategy. Must be not null.
-
-
Method Detail
-
orderProperties
public java.util.List<PropertyModel> orderProperties(java.util.List<PropertyModel> properties, ClassModel classModel)
Sorts class properties either, by classJsonbPropertyOrderannotation, or byPropertyOrderStrategyif set inJsonbConfig.- Parameters:
properties- Properties to sort.classModel- Class model.- Returns:
- Sorted list of properties.
-
-