public class ValidHostValidator extends java.lang.Object implements ConstraintValidator<ValidHost>
InetAddress.getByName(String).| Modifier and Type | Field and Description |
|---|---|
private ValidHost |
annotation |
private static Logger |
LOGGER |
| Constructor and Description |
|---|
ValidHostValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(ValidHost 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(ValidHost annotation)
ConstraintValidatorinitialize in interface ConstraintValidator<ValidHost>annotation - the annotation value this validator will be validating.public boolean isValid(java.lang.String name,
java.lang.Object value)
ConstraintValidatorisValid in interface ConstraintValidator<ValidHost>name - the name to use for error reportingvalue - the value to validate.true if the given value is valid.