}
}
}
if (validatorObject instanceof Validator) {
Validator validator = (Validator) validatorObject;
QName vldName = validator.getName();
if (vldName.equals(OBJECT_TYPE)) {
// Type info not specified on validator, so assuming it's a generic/multi-type validator...
validators.add(validator);
} else if ((nameIsWild || vldName.equals(name))) {
// Matching (specific) or wildcard type info specified...
validators.add(validator);
} else if (isAssignableFrom(vldName, name)) {
// Compatible Java types...
validators.add(validator);
}
if (!nameIsWild) {
validator.setName(name);
}
}
if (validators.isEmpty()) {
throw ValidateMessages.MESSAGES.errorConstructingValidatorClassNotSupported(validatorObject.getClass().getName(),