throw new RuntimeException("class " + extensionClass.getName() + " is not a valid marshalling extension. " +
"marshalling extensions should implement: " + MarshallingExtensionConfigurator.class.getName());
}
try {
final MarshallingExtensionConfigurator configurator
= extensionClass.asSubclass(MarshallingExtensionConfigurator.class).newInstance();
configurator.configure(mappingContext);
}
catch (Exception e) {
throw new RuntimeException("error loading marshalling extension: " + extensionClass.getName(), e);
}
}