I am currently writing custom validator for Spring Boot app and its idea is mainly to do some validations depending on other validations. For example, I want one field to be @NotNull if some other field is null, but the idea is to make it more generic, so that this conditional validations can be changed. For this purpose I tried to use validation classes from annotations, that already exist, like @NotNull or @Size, but turned out they don't have them:
@Constraint(validatedBy = { })
public @interface NotNull {
}
What do these braces after validatedBy mean? How can I get the Validator that this interface uses?