if (this.formatterCache == null)
{
this.formatterCache = new ConcurrentHashMap<Class<?>, Formatter>();
}
Formatter found = findFormatterFor(type);
if (found == null)
{
if(LOGGER.isLoggable(Level.INFO))
{
LOGGER.info("default formatter used for: " + type.getName());
}
found = FormatterBuilder.createFormatter(type);
}
if(found.isStateless())
{
this.formatterCache.put(type, found);
}
return found;
}