org.apache.logging.log4j.core.config.plugins.validation.validators
Class RequiredValidator
java.lang.Object
org.apache.logging.log4j.core.config.plugins.validation.validators.RequiredValidator
- All Implemented Interfaces:
- ConstraintValidator<Required>
public class RequiredValidator
- extends Object
- implements ConstraintValidator<Required>
Validator that checks an object for emptiness. Emptiness is defined here as:
- Since:
- 2.1
Method Summary |
void |
initialize(Required annotation)
Called before this validator is used with the constraint annotation value. |
boolean |
isValid(Object value)
Indicates if the given value is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequiredValidator
public RequiredValidator()
initialize
public void initialize(Required annotation)
- Description copied from interface:
ConstraintValidator
- Called before this validator is used with the constraint annotation value.
- Specified by:
initialize
in interface ConstraintValidator<Required>
- Parameters:
annotation
- the annotation value this validator will be validating.
isValid
public boolean isValid(Object value)
- Description copied from interface:
ConstraintValidator
- Indicates if the given value is valid.
- Specified by:
isValid
in interface ConstraintValidator<Required>
- Parameters:
value
- the value to validate.
- Returns:
true
if the given value is valid.
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.