class InterpolationConverterFactory implements ConverterFactory {

    public Converter createConverter(Class<?> source, Class<?> target, Hints hints) {
        if (source == null || target == null || !source.equals(String.class)) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("InterpolationConverterFactory can be applied from Strings to Interpolation only.");
            }
            return null; // only do strings
        }
        if (Interpolation.class.isAssignableFrom(target)) {
            return THE_INTERPOLATION_CONVERTER;
        } else {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("InterpolationConverterFactory can be applied from Strings to Interpolation  only.");
            }
        }
        return null;
    }

}