public static Converter<?> toConverter(FacesContext context, Object converter) {
        if (converter == null) {
            return null;
        }
        if (converter instanceof Converter) {
            return (Converter<?>) converter;
        }
        if (converter instanceof String) {
            return context.getApplication().createConverter((String) converter);
        }
        throw new FacesException("Unsupported type: " + converter.getClass());
    }
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