public static interface PropertyConverter.Context
Modifier and Type | Method and Description |
---|---|
Object |
convert(String value,
Class<?> type)
Converts a string representation of the given type to an instance
of that type.
|
Class<?> |
getTargetType()
Gets the target type for requested conversion.
|
String |
resolve(String name,
String defaultValue)
Resolves a property name to a value.
|
Class<?> getTargetType()
null
)String resolve(String name, String defaultValue)
name
- the name to resolvedefaultValue
if the name could not be
resolvedObject convert(String value, Class<?> type)
value
- the value to converttype
- target typetype
IllegalArgumentException
- if value
cannot be converted
into an instance of type
because it is syntactically
invalidUnsupportedOperationException
- if conversion to type
is not supported by this contextCopyright © 2014–2015. All rights reserved.