*/
protected void createFieldHandlers(final MappingRoot mapping)
throws MappingException {
Enumeration enumeration = mapping.enumerateFieldHandlerDef();
while (enumeration.hasMoreElements()) {
FieldHandlerDef def = (FieldHandlerDef) enumeration.nextElement();
String name = def.getName();
if (_fieldHandlers.containsKey(name)) {
throw new MappingException(Messages.format("mapping.dupFieldHandler", name));
}
Class clazz = resolveType(def.getClazz());
FieldHandler fieldHandler = null;
try {
if (!FieldHandler.class.isAssignableFrom(clazz)) {
throw new MappingException(Messages.format("mapping.classNotFieldHandler",
name, def.getClazz()));
}
fieldHandler = (FieldHandler) clazz.newInstance();
_fieldHandlers.put(name, fieldHandler);
} catch (InstantiationException e) {
throw new MappingException(e);