com.iparelan.util.validation
Class NonNullClassValidationStrategy
java.lang.Object
com.iparelan.util.UtilObject
com.iparelan.util.validation.AbstractValidationStrategy<Class<?>>
com.iparelan.util.validation.NonNullClassValidationStrategy
- All Implemented Interfaces:
- ValidationStrategy<Class<?>>
@Immutable
@Copyright(value="Copyright © 2008, Iparelan Solutions, LLC. All rights reserved.")
public final class NonNullClassValidationStrategy
- extends AbstractValidationStrategy<Class<?>>
A validator that ensures a class is not null
.
Fields inherited from interface com.iparelan.util.validation.ValidationStrategy |
BIG_DECIMAL_RANGE, BIG_INTEGER_RANGE, BYTE_RANGE, CALENDAR_RANGE, CHARACTER_RANGE, DATE_RANGE, DOUBLE_RANGE, FILE, FLOAT_RANGE, GREGORIAN_CALENDAR_RANGE, INTEGER, INTEGER_RANGE, LONG_RANGE, NON_EMPTY_STRING, NON_NULL_CLASS, NON_NULL_NON_EMPTY_STRING, NON_NULL_OBJECT, NON_NULL_STRING, SHORT_RANGE, SQL_DATE_RANGE, SQL_TIME_RANGE, SQL_TIMESTAMP_RANGE |
NonNullClassValidationStrategy
NonNullClassValidationStrategy()
- Creates a
NonNullClassValidationStrategy
.
NonNullClassValidationStrategy
public NonNullClassValidationStrategy(String valueDescription)
- Creates a
NonNullClassValidationStrategy
.
- Parameters:
valueDescription
- The value description of this ValidationStrategy
. May
not be null
or the empty string.
- Throws:
IllegalArgumentException
- Iff valueDescription
is either null
or the
empty string.
validate
public void validate(@Nullable
Class<?> theClass,
Object... context)
- Description copied from interface:
ValidationStrategy
- Validates the specified value.
- Parameters:
theClass
- The value to be validated. May not be null
.context
- Any information required for, or related to, the validation of
unvalidated
. The semantics (including whether null
-ness is permitted) of this parameter are defined by the
implementations of this method. The first contextual argument
is, by convention, a String
containing a description of
the value being validated.
getValidatorDescription
public String getValidatorDescription()
- Description copied from class:
AbstractValidationStrategy
- Produces the description of this
ValidationStrategy
.
- Specified by:
getValidatorDescription
in class AbstractValidationStrategy<Class<?>>
- Returns:
- The description of this
ValidationStrategy
. Never
null
.
Copyright © 2008 Iparelan Solutions, LLC. All rights reserved.