Annotation Interface Upcast
Declares a method that transforms an object from a previous revision to a newer one.
Upcasters are invoked during deserialization when a serialized object's revision is older than the current revision. They enable seamless version evolution of domain objects.
This annotation must be placed on a method that takes a single argument (the older object) and returns the transformed object. The method must be side-effect-free and deterministic.
Spring Integration: Any Spring bean containing methods annotated with @Upcast
is automatically discovered and registered with the serializer at startup.
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
type
String typeThe fully qualified type name this upcaster applies to (e.g., the original serialized class name). -
revision
int revisionThe revision number of the input type this method handles.This is the revision the method accepts and transforms from.
-