Package org.springframework.aot.hint
Class SerializationHints
java.lang.Object
org.springframework.aot.hint.SerializationHints
Gather the need for Java serialization at runtime.
- Since:
- 6.0
- Author:
- Stephane Nicoll
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn thejava serialization hintsfor types that need to be serialized using Java serialization at runtime.registerType(Class<? extends Serializable> type) Register that the specified type need to be serialized using java serialization.registerType(Class<? extends Serializable> type, Consumer<JavaSerializationHint.Builder> serializationHint) Register that the specified type need to be serialized using java serialization.registerType(TypeReference type) Register that the type defined by the specifiedTypeReferenceneed to be serialized using java serialization.registerType(TypeReference type, Consumer<JavaSerializationHint.Builder> serializationHint) Register that the type defined by the specifiedTypeReferenceneed to be serialized using java serialization.
- 
Constructor Details- 
SerializationHintspublic SerializationHints()
 
- 
- 
Method Details- 
javaSerializationHintsReturn thejava serialization hintsfor types that need to be serialized using Java serialization at runtime.- Returns:
- a stream of java serialization hints
 
- 
registerTypepublic SerializationHints registerType(TypeReference type, @Nullable Consumer<JavaSerializationHint.Builder> serializationHint) Register that the type defined by the specifiedTypeReferenceneed 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
 
- 
registerTypeRegister that the type defined by the specifiedTypeReferenceneed to be serialized using java serialization.- Parameters:
- type- the type to register
- Returns:
- this, to facilitate method chaining
 
- 
registerTypepublic SerializationHints registerType(Class<? extends Serializable> type, @Nullable Consumer<JavaSerializationHint.Builder> serializationHint) 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
 
- 
registerTypeRegister that the specified type need to be serialized using java serialization.- Parameters:
- type- the type to register
- Returns:
- this, to facilitate method chaining
 
 
-