contructorConstraints.put(Arrays.toString(cons.getParameterTypes()), consDesc);
final List<String> names = factoryContext.getParameterNameProvider().getParameterNames(cons);
final boolean isInnerClass = cons.getDeclaringClass().getEnclosingClass() != null && !Modifier.isStatic(cons.getDeclaringClass().getModifiers());
final AnnotationIgnores annotationIgnores = factoryContext.getFactory().getAnnotationIgnores();
{
final Annotation[][] paramsAnnos = cons.getParameterAnnotations();
int idx = 0;
if (isInnerClass) { // paramsAnnos.length = parameterTypes.length - 1 in this case
final ParameterDescriptorImpl paramDesc = new ParameterDescriptorImpl(metaBean, EMPTY_VALIDATION, names.get(idx));
consDesc.getParameterDescriptors().add(paramDesc);
idx++;
}
for (final Annotation[] paramAnnos : paramsAnnos) {
if (annotationIgnores.isIgnoreAnnotationOnParameter(cons, idx)) {
consDesc.getParameterDescriptors().add(new ParameterDescriptorImpl(metaBean, EMPTY_VALIDATION, names.get(idx)));
} else if (cons.getParameterTypes().length > idx) {
ParameterAccess access = new ParameterAccess(cons.getParameterTypes()[idx], idx);
consDesc.addValidations(processAnnotations(consDesc, paramAnnos, access, idx, names.get(idx)).getValidations());
} // else anonymous class so that's fine
idx++;
}
if (!annotationIgnores.isIgnoreAnnotations(cons)) {
for (final Annotation anno : cons.getAnnotations()) {
if (!Valid.class.isInstance(anno)) {
processAnnotations(null, consDesc, cons.getDeclaringClass(), anno);
} else {
consDesc.setCascaded(true);
}
}
}
}
if (annotationIgnores.isIgnoreAnnotationOnCrossParameter(cons) && consDesc.getCrossParameterDescriptor() != null) {
consDesc.setCrossParameterDescriptor(null);
}
if (annotationIgnores.isIgnoreAnnotationOnReturn(cons) && consDesc.getReturnValueDescriptor() != null) {
consDesc.setReturnValueDescriptor(null);
}
final MetaConstructor metaConstructor = metaBean.getConstructor(cons);
if (metaConstructor != null) {