CordaSerializationTransformEnumDefaults.value - corda

corda / net.corda.core.serialization / CordaSerializationTransformEnumDefaults / value

# value

`vararg val value: Array<out CordaSerializationTransformEnumDefault>`

an array of CordaSerializationTransformEnumDefault.

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("D", "C"))
    enum class ExampleEnum {
      A, B, C, D
    }

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

IMPORTANT - Once added (and in production) do NOT remove old annotations. See documentation for more discussion on this point!.

### Property

`value` -

an array of CordaSerializationTransformEnumDefault.

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("D", "C"))
    enum class ExampleEnum {
      A, B, C, D
    }

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

IMPORTANT - Once added (and in production) do NOT remove old annotations. See documentation for more discussion on this point!.