| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final BeanMetaDataManager | beanMetaDataManager
Used to get access to the bean meta data. |
| private final ConstraintValidatorFactory | constraintValidatorFactory
Reference to shared |
| private final HibernateConstraintValidatorInitializationContext | constraintValidatorInitializationContext
The constraint initialization context is stored at this level to prevent creating a new instance each time we initialize a new constraint validator as, for now, it only contains Validator scoped objects. |
| private final ConstraintValidatorManager | constraintValidatorManager
Manages the life cycle of constraint validator instances |
| private static final Collection | DEFAULT_GROUPS
The default group array used in case any of the validate methods is called without a group. |
| private static final Log | |
| private final TraversableResolver | traversableResolver
|
| private final transient ValidationOrderGenerator | validationOrderGenerator
Used to resolve the group execution order for a validate call. |
| private final ValidatorScopedContext | validatorScopedContext
Context containing all |
| private final ValueExtractorManager |
| Access | Constructor and Description |
|---|---|
| public | ValidatorImpl(ConstraintValidatorFactory constraintValidatorFactory, BeanMetaDataManager beanMetaDataManager, ValueExtractorManager valueExtractorManager, ConstraintValidatorManager constraintValidatorManager, ValidationOrderGenerator validationOrderGenerator, ValidatorFactoryScopedContext validatorFactoryScopedContext)
|
| Modifier and Type | Method and Description |
|---|---|
| private BeanValueContext | |
| private ValidationOrder | |
| public ExecutableValidator | forExecutables()
Implements jakarta. |
| private PropertyMetaData | |
| private Object | getCascadableValue(BaseBeanValidationContext<?> validationContext, Object object, Cascadable cascadable)
|
| public final BeanDescriptor | getConstraintsForClass(Class<?>
class or interface type evaluated clazz)Implements jakarta. |
| private <T> ValueContext | getExecutableValueContext(T object, ExecutableMetaData executableMetaData, Validatable validatable, Class<?> group)
|
| private ValidationContextBuilder | |
| private <V> BeanValueContext | Returns: Returns an instance ofValueContext which describes the local validation context associated to
the given property path.The validation context. validationContext, PathImpl The property path for which constraints have to be collected. propertyPath)Returns a value context pointing to the given property path relative to the specified root class for a given value. |
| private <V> BeanValueContext | Returns: Returns an instance ofValueContext which describes the local validation context associated to
the given property path.The class of the root bean. rootBeanClass, PathImpl The property path for which constraints have to be collected. propertyPath)Returns a value context pointing to the given property path relative to the specified root class without a value. |
| private boolean | isCascadeRequired(BaseBeanValidationContext<?> validationContext, Object traversableObject, PathImpl path, ConstraintLocation.
|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | isReachable(BaseBeanValidationContext<?> validationContext, Object traversableObject, PathImpl path, ConstraintLocation.
|
| private boolean | |
| private boolean | isValidationRequired(BaseBeanValidationContext<?> validationContext, ValueContext<?, ?> valueContext, MetaConstraint<?> metaConstraint)
|
| private boolean | needToCallTraversableResolver(PathImpl path, ConstraintLocation.
|
| private void | |
| private void | |
| private boolean | |
| public final <T> T | unwrap(Class<T>
the class of the object to be returned type)Implements jakarta. |
| public final <T> Set | validate(T
object to validate object, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. object.
|
| private void | validateCascadedAnnotatedObjectForCurrentGroup(Object value, BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, CascadingMetaData cascadingMetaData)
|
| private void | validateCascadedConstraints(BaseBeanValidationContext<?>
The execution context validationContext, ValueContext<?, Object> Collected information for single validation valueContext)Validates all cascaded constraints for the given bean using the current group set in the execution context. |
| private void | validateCascadedContainerElementsForCurrentGroup(Object value, BaseBeanValidationContext<?> validationContext, ValueContext<?, ?> valueContext, List<ContainerCascadingMetaData> containerElementTypesCascadingMetaData)
|
| private void | validateCascadedContainerElementsInContext(Object value, BaseBeanValidationContext<?> validationContext, ValueContext<?, ?> valueContext, ContainerCascadingMetaData cascadingMetaData, ValidationOrder validationOrder)
|
| private void | validateConstraintsForCurrentGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<?, Object> valueContext)
|
| private <U> void | validateConstraintsForDefaultGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<U, Object> valueContext)
|
| private void | validateConstraintsForNonDefaultGroup(BaseBeanValidationContext<?> validationContext, BeanValueContext<?, Object> valueContext)
|
| private <U> boolean | validateConstraintsForSingleDefaultGroupElement(BaseBeanValidationContext<?> validationContext, ValueContext<U, Object> valueContext, final Map<Class<?>, Class<?>> validatedInterfaces, Class<? super U> clazz, Set<MetaConstraint<?>> metaConstraints, Group defaultSequenceMember)
|
| public <T> Set | validateConstructorParameters(Constructor<? extends T>
the constructor for which the parameter constraints is validated constructor, Object[] the values provided by the caller for the given constructor's
parameters parameterValues, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. |
| public <T> Set | validateConstructorReturnValue(Constructor<? extends T>
the constructor for which the return value constraints is validated constructor, T the object instantiated by the given method createdObject, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. |
| private < The root bean type T, U> Set | Returns: Set of constraint violations or the empty set if there were no violations.the global validation context validationContext, BeanValueContext<U, Object> the current validation context valueContext, ValidationOrder Contains the information which and in which order groups have to be executed validationOrder)Validates the given object using the available context information. |
| private boolean | validateMetaConstraint(BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, Object parent, MetaConstraint<?> metaConstraint)
|
| private void | validateMetaConstraints(BaseBeanValidationContext<?> validationContext, ValueContext<?, Object> valueContext, Object parent, Iterable<MetaConstraint<?>> constraints)
|
| public <T> Set | validateParameters(T
the object on which the method to validate is invoked object, Method the method for which the parameter constraints is validated method, Object[] the values provided by the caller for the given method's
parameters parameterValues, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. |
| private <T> Set | |
| private <T> void | validateParametersForGroup(ExecutableValidationContext<T> validationContext, ExecutableMetaData executableMetaData, Object[] parameterValues, Group group)
|
| private <T> void | validateParametersForSingleGroup(ExecutableValidationContext<T> validationContext, Object[] parameterValues, ExecutableMetaData executableMetaData, Class<?> currentValidatedGroup)
|
| private <T> void | validateParametersInContext(ExecutableValidationContext<T> validationContext, Object[] parameterValues, ValidationOrder validationOrder)
|
| public final <T> Set | validateProperty(T
object to validate object, String property to validate (i.e. field and getter constraints) propertyName, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. object
named propertyName.
|
| public <T> Set | validateReturnValue(T
the object on which the method to validate is invoked object, Method the method for which the return value constraints is validated method, Object the value returned by the given method returnValue, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default)Implements jakarta. |
| private <T> Set | |
| private <T> void | validateReturnValueForGroup(BaseBeanValidationContext<T> validationContext, ExecutableMetaData executableMetaData, T bean, Object value, Group group)
|
| private <T> void | validateReturnValueForSingleGroup(BaseBeanValidationContext<T> validationContext, ExecutableMetaData executableMetaData, T bean, Object value, Class<?> oneGroup)
|
| private <V, T> void | validateReturnValueInContext(ExecutableValidationContext<T> validationContext, T bean, V value, ValidationOrder validationOrder)
|
| public final <T> Set | validateValue(Class<T>
the bean type beanType, String property to validate propertyName, Object property value to validate value, Class<?>... the group or list of groups targeted for validation (defaults to
groups)Default).Implements jakarta. propertyName
of the class beanType would the property value be value.
|
| private <T> Set | validateValueInContext(BaseBeanValidationContext<T> validationContext, Object value, PathImpl propertyPath, ValidationOrder validationOrder)
|