Declares how a
Converter should be applied.
This annotation supports three use cases:
- Explicit converter
Specify a concrete converter class through
converter()when a component type has multiple applicable converters or when auto-apply is not desired. - Disable conversion
Set
disableConversion()totrueto prevent any auto-apply or inherited converter from being used. - Fallback to auto-apply
When the annotation is not present, Storm will attempt to resolve a
single matching converter where
autoApply() == true.
If both converter() and disableConversion() are set in a
conflicting way, conversion resolution will fail with a clear error.
- Since:
- 1.7
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?> Specifies the converter to be applied.booleanUsed to disable an auto-apply or inherited converter.
-
Element Details
-
converter
Class<?> converterSpecifies the converter to be applied. A value for this element must be specified if multiple converters would otherwise apply.- Default:
java.lang.Void.class
-
disableConversion
boolean disableConversionUsed to disable an auto-apply or inherited converter. If disableConversion is true, theconverterelement should not be specified.- Default:
false
-