|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Documented @Target(value={TYPE,METHOD}) public @interface FallbackConverter
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.
GenericFileConverter for an example.
Optional Element Summary | |
---|---|
boolean |
allowNull
Whether or not returning null is a valid response. |
boolean |
canPromote
Whether or not this fallback converter can be promoted to a first class type converter. |
public abstract boolean allowNull
public abstract boolean canPromote
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |