org.javalid.core.validator
Class NotNullAllValidatorImpl
java.lang.Object
org.javalid.core.validator.AbstractJavalidValidatorImpl<NotNullAll>
org.javalid.core.validator.NotNullAllValidatorImpl
- All Implemented Interfaces:
- JavalidValidator<NotNullAll>
public class NotNullAllValidatorImpl
- extends AbstractJavalidValidatorImpl<NotNullAll>
This class is responsible for validating several values at once and they
must be non-null all. It validates the NotNullAll annotation.
- Since:
- 1.2
- Version:
- 1.0
- Author:
- M.Reuvers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotNullAllValidatorImpl
public NotNullAllValidatorImpl()
doValidate
public java.util.List<ValidationMessage> doValidate(NotNullAll annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config)
- Specified by:
doValidate in class AbstractJavalidValidatorImpl<NotNullAll>
validateComplex
public java.util.List<ValidationMessage> validateComplex(NotNullAll annotation,
java.lang.Object value,
java.lang.String path,
JvConfigurationWrapper config,
ComplexValidationInfo info)
- Note that the incoming value is the CLASS instance that is under validation as this
annotation is class-level based.
- Specified by:
validateComplex in interface JavalidValidator<NotNullAll>- Overrides:
validateComplex in class AbstractJavalidValidatorImpl<NotNullAll>
- Parameters:
annotation - The annotation it is aboutvalue - The value to validatepath - The framework gives the full path for this value you are validating, thus
you can use it directly in the ValidationMessage as path.config - Wrapper containing public configuration info (such as reflectionsupport, beanlookup, can be used if needed)info - Information object about the current validation. Careful with using it! Know what you are doing.
- Returns:
- List with ValidationMessage when validation fails, if no error returns an EMPTY list (not NULL!!!)
requiresComplexCall
public boolean requiresComplexCall()
- Description copied from interface:
JavalidValidator
- Returns true if this validator requires the current annotation validator to fullfill its
validation (and all extra info).
Normal validators must return false. In that case the default validate(..) method
is called. If false is returned, the validateComplex(..) method is called.
- Specified by:
requiresComplexCall in interface JavalidValidator<NotNullAll>- Overrides:
requiresComplexCall in class AbstractJavalidValidatorImpl<NotNullAll>
- Returns:
- True if it intends to do complex validation