Annotation Interface Serializable
Annotation indicating that a field should be deserialized or serialized from the config.
By default, this annotation is not assumed.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends TypeAdapter> Adapter override class.The comment to apply before the element when serializing.booleanIndicates whether this field is required to be present in the config.booleanWhether to serialize the value to the config.When not empty, this value overrides the auto generated serialized key in the config.
-
Element Details
-
required
boolean requiredIndicates whether this field is required to be present in the config. If the field is not present, andrequired = true, then an exception will be thrown during deserialization. Ifrequired = falseand the field is not present, then the field value will remain unmodified.- Default:
false
-
comment
-
adapter
Class<? extends TypeAdapter> adapterAdapter override class. The class must have a public no-args constructor.- Default:
ca.spottedleaf.yamlconfig.adapter.TypeAdapter.class
-
serialize
boolean serializeWhether to serialize the value to the config.- Default:
true
-
serializedKey
String serializedKeyWhen not empty, this value overrides the auto generated serialized key in the config.- Default:
""
-