Package space.arim.dazzleconf.engine
Enum UpdateReason
- All Implemented Interfaces:
Serializable,Comparable<UpdateReason>,java.lang.constant.Constable
A reason why a particular path within a configuration was updated
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed in context of migrations, such as changes in the organization or format of the config.Used when an option was missing, so the value was supplied withDefaultValues.ifMissing().A catch-all for other or unknown reasons.An existing option was updated to another value. -
Method Summary
Modifier and TypeMethodDescriptionstatic UpdateReasonReturns the enum constant of this type with the specified name.static UpdateReason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MISSING
Used when an option was missing, so the value was supplied withDefaultValues.ifMissing().The path thus represents that of the formerly missing value.
-
UPDATED
An existing option was updated to another value.This typically happens when a serializer decides a better representation of the value is available, e.g. a string representation of a number is replaced with the number itself.
-
MIGRATED
Used in context of migrations, such as changes in the organization or format of the config.Potential usage:
- A configuration entry moved to a different place.
- A configuration entry was split up into separate options, or separate options were combined.
- The representation of a value changed, and the new config version requires converting to the new representation. For example, changing the format of Minecraft clickable messages from legacy formatting to MiniMessage.
- There is a path for the configuration version itself, and that version had to be updated.
-
OTHER
A catch-all for other or unknown reasons.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-