extensionClass = pu.getClassLoader().loadClass(injectionTypeName);
} catch (ClassNotFoundException e) {
throw MESSAGES.cannotLoadFromJpa(e, injectionTypeName);
}
// get example of target object
Object targetValueToInject = entityManager.unwrap(extensionClass);
// build array of classes that proxy will represent.
Class[] targetInterfaces = targetValueToInject.getClass().getInterfaces();
Class[] proxyInterfaces = new Class[targetInterfaces.length + 1]; // include extra element for extensionClass
boolean alreadyHasInterfaceClass = false;