return loadHandlerClass(manualDefinition.getReadHandler());
}
// check whether a multiplexer is defined ...
// find multiplexer for this class...
MultiplexMappingDefinition mplex =
getFactoryLoader().getMultiplexDefinition(classToRead);
if (mplex == null) {
mplex = this.classToHandlerMapping.getMultiplexDefinition(classToRead);
}
if (mplex != null) {
final String attributeValue = atts.getValue(mplex.getAttributeName());
if (attributeValue == null) {
throw new XmlReaderException(
"Multiplexer type attribute is not defined: " + mplex.getAttributeName()
+ " for " + classToRead
);
}
final MultiplexMappingEntry entry =
mplex.getEntryForType(attributeValue);
if (entry == null) {
throw new XmlReaderException(
"Invalid type attribute value: " + mplex.getAttributeName() + " = "
+ attributeValue
);
}
final Class c = loadClass(entry.getTargetClass());
if (!c.equals(mplex.getBaseClass())) {
Log.debug(
"Continue search on next level : " + c + " after " + mplex.getBaseClass()
);
return findHandlerForClass(c, atts, history);
}
else {
Log.debug ("Muliplexer is also generic definition ...");