Package dev.orne.beans
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 Summary
Modifier and TypeFieldDescriptionstatic final BeanAnnotationFinder<BeanReference,
BeanReference.List> TheBeanReference
annotation finder. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Returnstrue
if specified bean is valid reference to it's bean type.static boolean
isValid
(@NotNull Object value, @NotNull BeanAnnotationFinder<? extends BeanReference, ?> annotationFinder) Returnstrue
if specified bean is valid reference to it's bean type.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.validation.ConstraintValidator
initialize
-
Field Details
-
FINDER
TheBeanReference
annotation finder.
-
-
Constructor Details
-
ValidBeanReferenceValidator
public ValidBeanReferenceValidator()Creates a new instance.
-
-
Method Details
-
isValid
- Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<ValidBeanReference,
Object>
-
isValid
Returnstrue
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) Returnstrue
if specified bean is valid reference to it's bean type.- Parameters:
value
- The bean to validateannotationFinder
- TheBeanAnnotationFinder
to use- Returns:
- If the bean is a valid bean reference
-