CordaSerializationTransformEnumDefaults

This annotation is used to mark an enumerated type as having had multiple members added. It acts as a container annotation for instances of CordaSerializationTransformEnumDefault, each of which details individual additions. NOTE: Order is important, new values should always be added before any others.

 // initial implementation
 enum class ExampleEnum {
   A, B, C
 }

 // First alteration
 @CordaSerializationTransformEnumDefaults(
     @CordaSerializationTransformEnumDefault(newName = "D", oldName = "C"))
 enum class ExampleEnum {
   A, B, C, D
 }

 // Second alteration, new transform is placed at the head of the list
 @CordaSerializationTransformEnumDefaults(
     @CordaSerializationTransformEnumDefault(newName = "E", oldName = "C"),
     @CordaSerializationTransformEnumDefault(newName = "D", oldName = "C"))
 enum class ExampleEnum {
   A, B, C, D, E
 }

IMPORTANT: Once added (and in production), do NOT remove old annotations. See documentation for more information.

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard