Class SerializationHints

java.lang.Object
org.springframework.aot.hint.SerializationHints

@Deprecated(since="7.0.6", forRemoval=true) public class SerializationHints extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of ReflectionHints
Gather the need for Java serialization at runtime.
Since:
6.0
Author:
Stephane Nicoll
See Also:
  • Constructor Details

    • SerializationHints

      public SerializationHints()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • javaSerializationHints

      public Stream<JavaSerializationHint> javaSerializationHints()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the java serialization hints for types that need to be serialized using Java serialization at runtime.
      Returns:
      a stream of java serialization hints
    • registerType

      public SerializationHints registerType(TypeReference type, @Nullable Consumer<JavaSerializationHint.Builder> serializationHint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Register that the type defined by the specified TypeReference need to be serialized using java serialization.
      Parameters:
      type - the type to register
      serializationHint - a builder to further customize the serialization
      Returns:
      this, to facilitate method chaining
    • registerType

      public SerializationHints registerType(TypeReference type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Register that the type defined by the specified TypeReference need to be serialized using java serialization.
      Parameters:
      type - the type to register
      Returns:
      this, to facilitate method chaining
    • registerType

      public SerializationHints registerType(Class<? extends Serializable> type, @Nullable Consumer<JavaSerializationHint.Builder> serializationHint)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Register that the specified type need to be serialized using java serialization.
      Parameters:
      type - the type to register
      serializationHint - a builder to further customize the serialization
      Returns:
      this, to facilitate method chaining
    • registerType

      public SerializationHints registerType(Class<? extends Serializable> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Register that the specified type need to be serialized using java serialization.
      Parameters:
      type - the type to register
      Returns:
      this, to facilitate method chaining