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
FieldsModifier and TypeFieldDescriptionstatic final BeanAnnotationFinder<BeanReference,BeanReference.List> TheBeanReferenceannotation finder. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturnstrueif specified bean is valid reference to it's bean type.static booleanisValid(@NotNull Object value, @NotNull BeanAnnotationFinder<? extends BeanReference, ?> annotationFinder) Returnstrueif specified bean is valid reference to it's bean type.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.validation.ConstraintValidator
initialize
-
Field Details
-
FINDER
TheBeanReferenceannotation finder.
-
-
Constructor Details
-
ValidBeanReferenceValidator
public ValidBeanReferenceValidator()Creates a new instance.
-
-
Method Details
-
isValid
- Specified by:
isValidin interfacejavax.validation.ConstraintValidator<ValidBeanReference,Object>
-
isValid
Returnstrueif 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) Returnstrueif specified bean is valid reference to it's bean type.- Parameters:
value- The bean to validateannotationFinder- TheBeanAnnotationFinderto use- Returns:
- If the bean is a valid bean reference
-