Annotation CordaSerializationTransformEnumDefaults

  • All Implemented Interfaces:
    java.lang.annotation.Annotation

    @Target(value = TYPE)@Retention(value = RUNTIME) 
    public @interface 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Array<CordaSerializationTransformEnumDefault> value()
      • Methods inherited from class java.lang.annotation.Annotation

        annotationType, equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait