}
if (UserPrime.class.isAssignableFrom(targetClass)) {
return new UserPrimeImpl();
}
if (UserGroupPrime.class.isAssignableFrom(targetClass)) {
return new UserGroupPrimeImpl();
}
// otherwise create instance directly
try {
return targetClass.newInstance();