SerializationWhitelist
Keywords: net.corda.core.serialization.SerializationWhitelist interface
Date: 2023-09-18

net.corda.core.serialization

## Interface SerializationWhitelist

-     public SerializationWhitelist

  Provide a subclass of this via the java.util.ServiceLoader mechanism to be able to whitelist types for serialisation that you cannot otherwise annotate. The name of the class must appear in a text file on the classpath under the path META-INF/services/net.corda.core.serialization.SerializationWhitelist

  See Also:
    java.util.ServiceLoader

- - ### Constructor Detail

    - #### SerializationWhitelist

          public SerializationWhitelist()

  - ### Method Detail

    - #### getWhitelist

          @NotNull
          java.util.List<java.lang.Class> getWhitelist()

      Optionally whitelist types for use in object serialization, as we lock down the types that can be serialized.

      For example, if you add a new `interface ContractState` it needs to be whitelisted. You can do that either by adding the `annotationclass CordaSerializable` annotation or via this method.

      See Also:
        `interface ContractState`, `annotationclass CordaSerializable`