|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The type that can be converted topublic interface Coercion<T>
Contract for a converter of strings to a defined type.
| Method Summary | |
|---|---|
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 |
String |
toString()
Description of the coercion useful for logging |
| Method Detail |
|---|
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()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||