}
try{
for(Field f: clasz.getDeclaredFields()){
f.setAccessible(true);
for(Annotation aa: f.getDeclaredAnnotations()){
ValidatorClass validatorClass = aa.annotationType().getAnnotation(ValidatorClass.class);
if (validatorClass != null){
Class<?> vc = validatorClass.value();
Object instance = vc.newInstance(); //创建验证类实例
vc.getMethod("init", Object.class).invoke(instance, aa);
boolean result = (Boolean)vc.getMethod("validate", Object.class).invoke(instance, f.get(this));
if (result == false){
String err = (String)vc.getMethod("getMessage").invoke(instance);