public static String getConvertedAsString(FacesContext context, UIComponent component, Object converter, Object value) {
        if (value != null) {
            Converter converterObject = toConverter(context, converter);
            if (converterObject == null) {
                converterObject = getConverter(context, value.getClass());
            }
            if (converterObject != null) {
                return converterObject.getAsString(context, component, value);
            }
        }

        return Objects.toString(value, null);
    }
Finds appropriate converter for a given value holder

@param context   FacesContext instance
@param component ValueHolder instance to look up converter for
@return          Converter
primefaces/src/main/java/org/primefaces/util/ComponentUtils.java