@Test void noDefaultConstructor() { assertThrows(RuntimeException.class, ()-> { ValidatorFactory.registerValidator(NoDefaultConstructorValidator.class); }); }
static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); }
ValidatorFactory { static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); } }
ValidatorFactory { static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); }  }
ValidatorFactory { static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); }  static List<ValidatorConfiguration> getConfigurations(String lang); static Validator getInstance(String validatorName); static Validator getInstance(ValidatorConfiguration config, Configuration globalConfig); }
ValidatorFactory { static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); }  static List<ValidatorConfiguration> getConfigurations(String lang); static Validator getInstance(String validatorName); static Validator getInstance(ValidatorConfiguration config, Configuration globalConfig);  }