format = parent.searchFormat(type);
classToFormat.put(type, format);
return format;
}
// Root context (search inheritable annotations).
DefaultTextFormat annotation = type
.getAnnotation(DefaultTextFormat.class);
if (annotation != null) { // Found it.
try {
format = (TextFormat<T>) annotation.value().newInstance();
classToFormat.put(type, format);
return format;
} catch (Throwable error) {
LogContext.warning(error);
}