Annotation Interface ConfigurationSerializable


@Target(TYPE) @Retention(CLASS) public @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 Elements
    Modifier and Type
    Optional Element
    Description
    Your alternative for SerializableAs.
    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 as
      Your alternative for SerializableAs. 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 scan
      Specify how to implement the generated serialization and deserialization methods.
      Returns:
      the scan type.
      Default:
      @xyz.janboerman.scalaloader.configurationserializable.Scan
    • constructUsing

      DeserializationMethod constructUsing
      Specify which of the three deserialization methods should be used. If you don't specify this, then the framework will pick a method based on the Scan.Type
      Returns:
      the deserialization method.
      See Also:
      Default:
      DESERIALIZE
    • registerAt

      InjectionPoint registerAt
      Specifies at what point the class is registered with Bukkit's ConfigurationSerialization system. Defaults to InjectionPoint.PLUGIN_ONENABLE.
      Returns:
      the injection point
      See Also:
      Default:
      PLUGIN_ONENABLE