|
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConditionalConverter
Allows a Converter, GenericConverter or ConverterFactory to
conditionally execute based on attributes of the source and target
TypeDescriptor.
Often used to selectively match custom conversion logic based on the presence of a
field or class-level characteristic, such as an annotation or method. For example, when
converting from a String field to a Date field, an implementation might return
true if the target field has also been annotated with @DateTimeFormat.
As another example, when converting from a String field to an Account field,
an implementation might return true if the target Account class defines a
public static findAccount(String) method.
Converter,
GenericConverter,
ConverterFactory,
ConditionalGenericConverter| Method Summary | |
|---|---|
boolean |
matches(TypeDescriptor sourceType,
TypeDescriptor targetType)
Should the conversion from sourceType to targetType currently under
consideration be selected? |
| Method Detail |
|---|
boolean matches(TypeDescriptor sourceType,
TypeDescriptor targetType)
sourceType to targetType currently under
consideration be selected?
sourceType - the type descriptor of the field we are converting fromtargetType - the type descriptor of the field we are converting to
|
Spring for Android | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||