vendredi 13 juillet 2018

How to customize ConvertUtilsBean.convert

I am using BeanUtils.describe to get values from class contains JAXElement. How I can register custom converter for this class ?

In comment there is written it can be customized:

The registered {@link Converter} for the
     * <code>java.lang.String</code> class will be used, which allows
     * applications to customize Object->String conversions (the default
     * implementation simply uses toString()).
public String convert(Object value) {

but in code I just see it looks just for String converter:

        final Converter converter = lookup(String.class);





Aucun commentaire:

Enregistrer un commentaire