}
private Field getField(Object check, String key) {
List<Field> fields = FieldUtils2.getFields(check.getClass(), true);
for (Field field : fields) {
RuleProperty propertyAnnotation = field.getAnnotation(RuleProperty.class);
if (propertyAnnotation != null && (StringUtils.equals(key, field.getName()) || StringUtils.equals(key, propertyAnnotation.key()))) {
return field;
}
}
return null;
}