Enum PropertySortUtils
- java.lang.Object
-
- java.lang.Enum<PropertySortUtils>
-
- com.github.victools.jsonschema.generator.impl.PropertySortUtils
-
- All Implemented Interfaces:
Serializable
,Comparable<PropertySortUtils>
public enum PropertySortUtils extends Enum<PropertySortUtils>
Utility class containing the declaration of the default property sort algorithm and its components.
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<MemberScope<?,?>>
DEFAULT_PROPERTY_ORDER
Comparator
sorting properties into the following groups and within each group alphabetically by their name.static Comparator<MemberScope<?,?>>
SORT_PROPERTIES_BY_NAME_ALPHABETICALLY
Comparator
sorting properties: alphabetically by their name.static Comparator<MemberScope<?,?>>
SORT_PROPERTIES_FIELDS_BEFORE_METHODS
Comparator
sorting properties: with fields before methods.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertySortUtils
valueOf(String name)
Returns the enum constant of this type with the specified name.static PropertySortUtils[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
SORT_PROPERTIES_FIELDS_BEFORE_METHODS
public static final Comparator<MemberScope<?,?>> SORT_PROPERTIES_FIELDS_BEFORE_METHODS
Comparator
sorting properties: with fields before methods.
-
SORT_PROPERTIES_BY_NAME_ALPHABETICALLY
public static final Comparator<MemberScope<?,?>> SORT_PROPERTIES_BY_NAME_ALPHABETICALLY
Comparator
sorting properties: alphabetically by their name.- See Also:
MemberScope.getSchemaPropertyName()
-
DEFAULT_PROPERTY_ORDER
public static final Comparator<MemberScope<?,?>> DEFAULT_PROPERTY_ORDER
Comparator
sorting properties into the following groups and within each group alphabetically by their name.- instance fields
- instance methods
- static fields
- static methods
- See Also:
MemberScope.getSchemaPropertyName()
-
-
Method Detail
-
values
public static PropertySortUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PropertySortUtils c : PropertySortUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropertySortUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-