Annotation Interface ConfigurationSerializable
Annotate your serializable class with this annotation instead of implementing
ConfigurationSerializable
.
ScalaLoader's serialization framework can generate the public serialize() method if it's not already present.
Additionally a deserialization method can be generated based on constructUsing()
, if one is not already present.- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionYour alternative forSerializableAs
.Specify which of the three deserialization methods should be used.Specifies at what point the class is registered with Bukkit's ConfigurationSerialization system.Specify how to implement the generated serialization and deserialization methods.
-
Element Details
-
as
String asYour alternative forSerializableAs
. This lets you specify the name of the type in its serialized form. If you specify the empty string then the framework falls back to using the class name.- Returns:
- the name of the type in its serialized form
- Default:
""
-
scan
Scan scanSpecify how to implement the generated serialization and deserialization methods.- Returns:
- the scan type.
- Default:
@xyz.janboerman.scalaloader.configurationserializable.Scan
-
constructUsing
DeserializationMethod constructUsingSpecify which of the three deserialization methods should be used. If you don't specify this, then the framework will pick a method based on theScan.Type
- Returns:
- the deserialization method.
- See Also:
- Default:
DESERIALIZE
-
registerAt
InjectionPoint registerAtSpecifies at what point the class is registered with Bukkit's ConfigurationSerialization system. Defaults toInjectionPoint.PLUGIN_ONENABLE
.- Returns:
- the injection point
- See Also:
- Default:
PLUGIN_ONENABLE
-