T - The type that can be converted topublic interface Coercion<T>
| Modifier and Type | Method and Description |
|---|---|
T |
coerce(CoercionTarget type,
String value)
Coerce the given string value into the type represented by this coercion.
|
T |
getDefaultValue(CoercionTarget target)
In the case where there is not value already set and a String value for coercion cannot be found then this will be used.
|
boolean |
hasDefaultValue()
For some coercions a default value on the coercion itself makes sense.
|
boolean |
isApplicableTo(CoercionTarget target)
Return true if this coercion is applicable for the given target type
|
default boolean |
isInverted()
If the coercion returns a fully fledged bean from a container then its already inverted i.e.
|
String |
toString()
Description of the coercion useful for logging
|
T coerce(CoercionTarget type, String value)
value - The string value to convert. WILL NOT be null.boolean isApplicableTo(CoercionTarget target)
boolean hasDefaultValue()
T getDefaultValue(CoercionTarget target)
String toString()
default boolean isInverted()
Copyright © 2003–2017 RedEngine Ltd. All rights reserved.