Package dev.orne.beans
Class ValidIdentity.ValidIdentityValidator
java.lang.Object
dev.orne.beans.ValidIdentity.ValidIdentityValidator
- All Implemented Interfaces:
javax.validation.ConstraintValidator<ValidIdentity,
Identity>
- Enclosing class:
- ValidIdentity
@API(status=INTERNAL,
since="0.4")
public static class ValidIdentity.ValidIdentityValidator
extends Object
implements javax.validation.ConstraintValidator<ValidIdentity,Identity>
Constraint validator for
ValidBeanIdentity
on Identity
instances.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(@NotNull ValidIdentity annotation) static boolean
Returnstrue
if specified bean is valid reference to it's bean type.static boolean
Returnstrue
if specified bean is valid reference to it's bean type.boolean
-
Constructor Details
-
ValidIdentityValidator
public ValidIdentityValidator()Creates a new instance.
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfacejavax.validation.ConstraintValidator<ValidIdentity,
Identity>
-
isValid
- Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<ValidIdentity,
Identity>
-
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 Identity value, @NotNull @NotNull Class<? extends Identity> expectedType) Returnstrue
if specified bean is valid reference to it's bean type.- Parameters:
value
- The bean to validateexpectedType
- The expected type of identity- Returns:
- If the bean is a valid bean reference
-