|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.properties.internal.converter.ConvertUtilsConverter
@Component @Singleton public class ConvertUtilsConverter
ConvertUtils based converter.
It's the default Converter, the one used when no other Converter could be found by
ConverterManager.
| Constructor Summary | |
|---|---|
ConvertUtilsConverter()
|
|
| Method Summary | ||
|---|---|---|
|
convert(java.lang.reflect.Type targetType,
java.lang.Object sourceValue)
|
|
void |
initialize()
By default ConvertUtils.convert(Object, Class) does not throw any exceptions for failed conversions. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvertUtilsConverter()
| Method Detail |
|---|
public void initialize()
ConvertUtils.convert(Object, Class) does not throw any exceptions for failed conversions.
Instead it will return some default value corresponding to the target type. We must override this behavior in
order to get the desired functionality.
initialize in interface Initializable
public <T> T convert(java.lang.reflect.Type targetType,
java.lang.Object sourceValue)
convert in interface ConverterT - the type in which the provided value has to be convertedtargetType - the type in which the provided value has to be convertedsourceValue - the value to convert
Converter.convert(java.lang.reflect.Type, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||