Annotation Type FallbackConverter


  • @Retention(RUNTIME)
    @Documented
    @Target({TYPE,METHOD})
    @Deprecated
    public @interface FallbackConverter
    Deprecated.
    use @Converter(fallback = true) instead
    An annotation used to mark methods to indicate code capable of being a fallback converter which are then auto-discovered using the Type Conversion Support.

    The difference between a regular @Converter and a @FallbackConverter is that the fallback is resolved at last if no regular converter could be found. Also the method signature is scoped to be generic to allow handling a broader range of types trying to be converted. The fallback converter can just return null if it can not handle the types to convert from/to.

    See Also:
    GenericFileConverter for an example.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean allowNull
      Deprecated.
      Whether or not returning null is a valid response.
      boolean canPromote
      Deprecated.
      Whether or not this fallback converter can be promoted to a first class type converter.
    • Element Detail

      • allowNull

        boolean allowNull
        Deprecated.
        Whether or not returning null is a valid response.
        Default:
        false
      • canPromote

        boolean canPromote
        Deprecated.
        Whether or not this fallback converter can be promoted to a first class type converter.
        Default:
        false