Enum Class UnknownTypeStrategy

java.lang.Object
java.lang.Enum<UnknownTypeStrategy>
io.fluxzero.sdk.common.serialization.UnknownTypeStrategy
All Implemented Interfaces:
Serializable, Comparable<UnknownTypeStrategy>, Constable

public enum UnknownTypeStrategy extends Enum<UnknownTypeStrategy>
Defines the strategy for handling unknown or unresolvable types during deserialization.

This is used by Serializer implementations to determine how to proceed when a type identifier is not recognized (e.g., missing class, renamed type).

  • AS_INTERMEDIATE – Treat unknown types as intermediate representations. Deserialization may still proceed later based on structural conversion or inspection.
  • IGNORE – Silently skip unknown types. The deserialized stream will exclude them.
  • FAIL – Immediately throw a DeserializationException upon encountering an unknown type.
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static UnknownTypeStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UnknownTypeStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null