注释类型 SerializableAs


@Retention(RUNTIME) @Target(TYPE) public @interface SerializableAs
Represents an "alias" that a ConfigurationSerializable may be stored as. If this is not present on a ConfigurationSerializable class, it will use the fully qualified name of the class.

This value will be stored in the configuration so that the configuration deserialization can determine what type it is.

Using this annotation on any other class than a ConfigurationSerializable will have no effect.

另请参阅:
  • 必需元素概要

    所需元素
    修饰符和类型
    必需的元素
    说明
    This is the name your class will be stored and retrieved as.
  • 元素详细资料

    • value

      String value
      This is the name your class will be stored and retrieved as.

      This name MUST be unique. We recommend using names such as "MyPluginThing" instead of "Thing".

      返回:
      Name to serialize the class as.