} else {
metaMethod = MetaMethod.class.cast(meta);
}
final Integer index = metaConstraint.getIndex();
if (index != null && index >= 0) {
MetaParameter param = metaMethod.getParameter(index);
if (param == null) {
param = new MetaParameter(metaMethod, index);
metaMethod.addParameter(index, param);
}
param.addAnnotation(metaConstraint.getAnnotation());
} else {
metaMethod.addAnnotation(metaConstraint.getAnnotation());
}
continue;
} else if (access.getElementType() == ElementType.CONSTRUCTOR){
final Constructor<?> constructor = Constructor.class.cast(metaConstraint.getMember());
meta = metabean.getConstructor(constructor);
final MetaConstructor metaConstructor;
if (meta == null) {
meta = new MetaConstructor(metabean, constructor);
metaConstructor = MetaConstructor.class.cast(meta);
metabean.addConstructor(constructor, metaConstructor);
} else {
metaConstructor = MetaConstructor.class.cast(meta);
}
final Integer index = metaConstraint.getIndex();
if (index != null && index >= 0) {
MetaParameter param = metaConstructor.getParameter(index);
if (param == null) {
param = new MetaParameter(metaConstructor, index);
metaConstructor.addParameter(index, param);
}
param.addAnnotation(metaConstraint.getAnnotation());
} else {
metaConstructor.addAnnotation(metaConstraint.getAnnotation());
}
continue;
} else { // property level