public class ValidPortValidator extends java.lang.Object implements ConstraintValidator<ValidPort>
Modifier and Type | Field and Description |
---|---|
private ValidPort |
annotation |
private static Logger |
LOGGER |
Constructor and Description |
---|
ValidPortValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(ValidPort annotation)
Called before this validator is used with the constraint annotation value.
|
boolean |
isValid(java.lang.String name,
java.lang.Object value)
Indicates if the given value is valid.
|
public void initialize(ValidPort annotation)
ConstraintValidator
initialize
in interface ConstraintValidator<ValidPort>
annotation
- the annotation value this validator will be validating.public boolean isValid(java.lang.String name, java.lang.Object value)
ConstraintValidator
isValid
in interface ConstraintValidator<ValidPort>
name
- the name to use for error reportingvalue
- the value to validate.true
if the given value is valid.