public void initialize(ValidateWith constraintAnnotation) { this.clazz = constraintAnnotation.value(); try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); validator = (Validator)constructor.newInstance(); } catch(Exception e) { throw new RuntimeException(e); } }
public void initialize(ValidateWith constraintAnnotation) { this.clazz = constraintAnnotation.value(); try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); validator = (Validator)constructor.newInstance(); } catch(Exception e) { throw new RuntimeException(e); } }
public void initialize(ValidateWith constraintAnnotation) { this.clazz = constraintAnnotation.value(); try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); validator = (Validator)constructor.newInstance(); } catch(Exception e) { throw new RuntimeException(e); } }
public void initialize(ValidateWith constraintAnnotation) { this.clazz = constraintAnnotation.value(); try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); validator = (Validator)constructor.newInstance(); } catch(Exception e) { throw new RuntimeException(e); } }
public void initialize(ValidateWith constraintAnnotation) { this.clazz = constraintAnnotation.value(); try { Constructor<?> constructor = clazz.getDeclaredConstructor(); constructor.setAccessible(true); validator = (Validator)constructor.newInstance(); } catch(Exception e) { throw new RuntimeException(e); } }