Annotation Interface Downcast


Declares a method that transforms an object from a newer revision to an older one.

Downcasters are used to emit legacy-compatible objects (e.g. for persistence or external systems).

Like Upcast, this annotation applies to methods that take a single argument and return a transformed object of an earlier revision.

Spring Integration: Any Spring bean containing methods annotated with @Downcast is automatically discovered and registered with the serializer at startup.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The revision number of the input object this method handles.
    The fully qualified type name this downcaster applies to (e.g., the latest version's class name).
  • Element Details

    • type

      String type
      The fully qualified type name this downcaster applies to (e.g., the latest version's class name).
    • revision

      int revision
      The revision number of the input object this method handles.

      This is the revision the method accepts and transforms from.