@SuppressWarnings("unchecked")
public <T> T construct(Class<T> componentType) {
if (componentType.isInterface()) {
Class componentImpl;
if (componentType.equals(StreamingMarshaller.class)) {
VersionAwareMarshaller versionAwareMarshaller = getInstance(VersionAwareMarshaller.class);
return componentType.cast(versionAwareMarshaller);
} else {
// add an "Impl" to the end of the class name and try again
componentImpl = loadClass(componentType.getName() + "Impl", configuration.getClassLoader());
}