|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ValueConverter
Implementation of this interface will be responsible for converting String values to the specific type. These are
registered with Waffle through the web.xml.
| Method Summary | ||
|---|---|---|
boolean |
accept(java.lang.Class<?> type)
Determines if converter is compatible with the given type |
|
|
convertValue(java.lang.String propertyName,
java.lang.String value,
java.lang.Class<T> toType)
Converts a String value to an Object of a given type |
|
| Method Detail |
|---|
boolean accept(java.lang.Class<?> type)
type - the type of the field a value is to be bound to
true is type is compatible
<T> T convertValue(java.lang.String propertyName,
java.lang.String value,
java.lang.Class<T> toType)
propertyName - the associated property name, which can be null, also needed to present
customized error messages.value - the String valuetoType - the Object type
BindException - if conversion fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||