Class ValidBeanReference.ValidBeanReferenceValidator

java.lang.Object
dev.orne.beans.ValidBeanReference.ValidBeanReferenceValidator
All Implemented Interfaces:
javax.validation.ConstraintValidator<ValidBeanReference,Object>
Enclosing class:
ValidBeanReference

@API(status=INTERNAL, since="0.1") public static class ValidBeanReference.ValidBeanReferenceValidator extends Object implements javax.validation.ConstraintValidator<ValidBeanReference,Object>
Constraint validator for ValidBeanReference.
See Also:
  • Field Details

  • Constructor Details

    • ValidBeanReferenceValidator

      public ValidBeanReferenceValidator()
      Creates a new instance.
  • Method Details

    • isValid

      public boolean isValid(Object value, javax.validation.ConstraintValidatorContext context)
      Specified by:
      isValid in interface javax.validation.ConstraintValidator<ValidBeanReference,Object>
    • isValid

      public static boolean isValid(@NotNull @NotNull Object value)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      Returns:
      If the bean is a valid bean reference
    • isValid

      public static boolean isValid(@NotNull @NotNull Object value, @NotNull @NotNull BeanAnnotationFinder<? extends BeanReference,?> annotationFinder)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      annotationFinder - The BeanAnnotationFinder to use
      Returns:
      If the bean is a valid bean reference