Constructor<?> constructor;
try {
constructor = AccessController.doPrivileged(GetDeclaredConstructorAction.of(clazz));
} catch (PrivilegedActionException e) {
InstantiatorFactory factory = services.get(InstantiatorFactory.class);
if (factory == null || !(factory.useInstantiators())) {
return ValidatorLogger.LOG.notProxyableNoConstructor(clazz, getDeclaringBeanInfo(declaringBean));
} else {
return null;
}
}
if (constructor == null) {
return ValidatorLogger.LOG.notProxyableNoConstructor(clazz, getDeclaringBeanInfo(declaringBean));
} else if (Modifier.isPrivate(constructor.getModifiers())) {
InstantiatorFactory factory = services.get(InstantiatorFactory.class);
if (factory == null || !(factory.useInstantiators())) {
return new UnproxyableResolutionException(ValidatorLogger.LOG.notProxyablePrivateConstructor(clazz, constructor, getDeclaringBeanInfo(declaringBean)));
} else {
return null;
}
} else if (Reflections.isTypeOrAnyMethodFinal(clazz)) {