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