Interface AnnotationValidator<T extends Annotation>

Type Parameters:
T - annotation type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Represents a validator of a custom annotation.
Since:
2.0.0
Author:
MrIvanPlays
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(T annotation, Object value, CustomOptions options, Field field)
    AnnotationConfig calls this method whenever it finds the custom annotation this validator is bound to in order to determine whether the inputted value is valid for the custom annotation with which the inputted Field field was annotated.
  • Method Details

    • validate

      ValidationResponse validate(T annotation, Object value, CustomOptions options, Field field)
      AnnotationConfig calls this method whenever it finds the custom annotation this validator is bound to in order to determine whether the inputted value is valid for the custom annotation with which the inputted Field field was annotated.
      Parameters:
      annotation - the annotation this validator validates
      value - the value AnnotationConfig received
      options - the custom options for the config resolver
      field - the annotated field
      Returns:
      validation response
      See Also: