Validator interface can
instantiate an instance of this class and delegate the metadata extraction to it.
| Modifier and Type | Class and Description |
|---|---|
| private static class | BeanMetaDataImpl.DefaultGroupSequenceContext<T>
Tuple for returning default group sequence, provider and validation order at once. |
| Modifier and Type | Field and Description |
|---|---|
| private final Set | allMetaConstraints
Set of all constraints for this bean type (defined on any implemented interfaces or super types) |
| private final Class | beanClass
The root bean class for this meta data. |
| private volatile BeanDescriptor | beanDescriptor
The bean descriptor for this bean. |
| private final Set | cascadedProperties
The cascaded properties of this bean. |
| private final List | classHierarchyWithoutInterfaces
The class hierarchy for this class starting with the class itself going up the inheritance chain. |
| private static final List | DEFAULT_GROUP_SEQUENCE
Represents the "sequence" of just Default.class. |
| private final List | defaultGroupSequence
The default groups sequence for this bean class. |
| private final DefaultGroupSequenceProvider | defaultGroupSequenceProvider
The default group sequence provider. |
| private final boolean | defaultGroupSequenceRedefined
{code true} if the default group sequence is redefined, either via a group sequence redefinition or a group sequence provider. |
| private final Set | directMetaConstraints
Set of all constraints which are directly defined on the bean or any of the directly implemented interfaces |
| private final Map | executableMetaDataMap
Contains constrained related meta data for all the constrained methods and constructors of the type represented by this bean meta data. |
| private final boolean | hasConstraints
Whether there are any constraints or cascades at all. |
| private static final Log | |
| private final Map | propertyMetaDataMap
Property meta data keyed against the property name |
| private final List | resolvedDefaultGroupSequence
The resolved default group sequence. |
| private final Set | unconstrainedExecutables
The set of unconstrained executables of the bean. |
| private final ValidationOrder | |
| private final ValidationOrderGenerator |
| Access | Constructor and Description |
|---|---|
| public | BeanMetaDataImpl(Class<T>
The Java type represented by this meta data object. beanClass, List<Class<?>> The default group sequence. defaultGroupSequence, DefaultGroupSequenceProvider<? super T> The default group sequence provider if set. defaultGroupSequenceProvider, Set<ConstraintMetaData> All constraint meta data relating to the represented type. constraintMetaDataSet, ValidationOrderGenerator validationOrderGenerator)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private Map | bySignature(Set<ExecutableMetaData> executables)
Builds up the method meta data for this type; each meta-data entry will be stored under the signature of the represented method and all the methods it overrides. |
| private static BeanDescriptor | createBeanDescriptor(Class<?> beanClass, Set<MetaConstraint<?>> allMetaConstraints, Map<String, PropertyMetaData> propertyMetaDataMap, Map<Signature, ExecutableMetaData> executableMetaDataMap, boolean defaultGroupSequenceRedefined, List<Class<?>> resolvedDefaultGroupSequence)
|
| public Class | |
| public BeanDescriptor | |
| public Set | getCascadables()
Implements org. @Valid.
|
| public List | |
| private static Set | |
| private static Map | getConstrainedConstructorsAsDescriptors(Map<Signature, ExecutableMetaData> executableMetaDataMap, boolean defaultGroupSequenceIsRedefined, List<Class<?>> resolvedDefaultGroupSequence)
|
| private static Map | getConstrainedMethodsAsDescriptors(Map<Signature, ExecutableMetaData> executableMetaDataMap, boolean defaultGroupSequenceIsRedefined, List<Class<?>> resolvedDefaultGroupSequence)
|
| private static Map | getConstrainedPropertiesAsDescriptors(Map<String, PropertyMetaData> propertyMetaDataMap, boolean defaultGroupSequenceIsRedefined, List<Class<?>> resolvedDefaultGroupSequence)
|
| public List | getDefaultGroupSequence(T
the bean state. beanState)Implements org. |
| private static <T> BeanMetaDataImpl. | getDefaultGroupSequenceData(Class<?> beanClass, List<Class<?>> defaultGroupSequence, DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider, ValidationOrderGenerator validationOrderGenerator)
|
| public Iterator | getDefaultValidationSequence(T beanState)
Implements org. @GroupSequence/@DefaultGroupSequenceProvider.
|
| private Set | |
| public Set | |
| public Set | |
| public PropertyMetaData | getMetaDataFor(String
The property name. propertyName)Implements org. |
| public Optional | getMetaDataFor(Executable
The executable of interest. executable)Implements org. |
| private static List | |
| public boolean | hasCascadables()
Implements org. true if this validatable has at least one cascadable element, false otherwise.
|
| public boolean | hasConstraints()
Implements org. true if the bean class for this bean meta data has any constraints at all, false otherwise.
|
| private boolean | |
| public boolean | |
| public String |
| allMetaConstraints | back to summary |
|---|---|
| private final Set<MetaConstraint<?>> allMetaConstraints Set of all constraints for this bean type (defined on any implemented interfaces or super types) | |
| beanClass | back to summary |
|---|---|
| private final Class<T> beanClass The root bean class for this meta data. | |
| beanDescriptor | back to summary |
|---|---|
| private volatile BeanDescriptor beanDescriptor The bean descriptor for this bean. Lazily created. | |
| cascadedProperties | back to summary |
|---|---|
| private final Set<Cascadable> cascadedProperties The cascaded properties of this bean. | |
| classHierarchyWithoutInterfaces | back to summary |
|---|---|
| private final List<Class<? super T>> classHierarchyWithoutInterfaces The class hierarchy for this class starting with the class itself going up the inheritance chain. Interfaces are not included. | |
| DEFAULT_GROUP_SEQUENCE | back to summary |
|---|---|
| private static final List<Class<?>> DEFAULT_GROUP_SEQUENCE Represents the "sequence" of just Default.class. | |
| defaultGroupSequence | back to summary |
|---|---|
| private final List<Class<?>> defaultGroupSequence The default groups sequence for this bean class. | |
| defaultGroupSequenceProvider | back to summary |
|---|---|
| private final DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider The default group sequence provider. | |
| defaultGroupSequenceRedefined | back to summary |
|---|---|
| private final boolean defaultGroupSequenceRedefined {code true} if the default group sequence is redefined, either via a group sequence redefinition or a group sequence provider. | |
| directMetaConstraints | back to summary |
|---|---|
| private final Set<MetaConstraint<?>> directMetaConstraints Set of all constraints which are directly defined on the bean or any of the directly implemented interfaces | |
| executableMetaDataMap | back to summary |
|---|---|
| private final Map<Signature, ExecutableMetaData> executableMetaDataMap Contains constrained related meta data for all the constrained methods and constructors of the type represented by this bean meta data. Keyed by executable, values are an aggregated view on each executable together with all the executables from the inheritance hierarchy with the same signature.
An entry will be stored once under the signature of the represented method and all the methods it overrides
(there will only be more than one entry in case of generics in the parameters, e.g. in case of a super-type
method | |
| hasConstraints | back to summary |
|---|---|
| private final boolean hasConstraints Whether there are any constraints or cascades at all. | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| propertyMetaDataMap | back to summary |
|---|---|
| private final Map<String, PropertyMetaData> propertyMetaDataMap Property meta data keyed against the property name | |
| resolvedDefaultGroupSequence | back to summary |
|---|---|
| private final List<Class<?>> resolvedDefaultGroupSequence The resolved default group sequence. | |
| unconstrainedExecutables | back to summary |
|---|---|
| private final Set<Signature> unconstrainedExecutables The set of unconstrained executables of the bean. It contains all the relevant signatures, following the same
rules as | |
| validationOrder | back to summary |
|---|---|
| private final ValidationOrder validationOrder | |
| validationOrderGenerator | back to summary |
|---|---|
| private final ValidationOrderGenerator validationOrderGenerator | |
| BeanMetaDataImpl | back to summary |
|---|---|
| public BeanMetaDataImpl(Class<T> beanClass, List<Class<?>> defaultGroupSequence, DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider, Set<ConstraintMetaData> constraintMetaDataSet, ValidationOrderGenerator validationOrderGenerator) Creates a new
| |
| bySignature | back to summary |
|---|---|
| private Map Builds up the method meta data for this type; each meta-data entry will be stored under the signature of the represented method and all the methods it overrides. | |
| createBeanDescriptor | back to summary |
|---|---|
| private static BeanDescriptor createBeanDescriptor(Class<?> beanClass, Set<MetaConstraint<?>> allMetaConstraints, Map<String, PropertyMetaData> propertyMetaDataMap, Map<Signature, ExecutableMetaData> executableMetaDataMap, boolean defaultGroupSequenceRedefined, List<Class<?>> resolvedDefaultGroupSequence) | |
| getBeanClass | back to summary |
|---|---|
| public Class Implements org.
| |
| getBeanDescriptor | back to summary |
|---|---|
| public BeanDescriptor getBeanDescriptor() Implements org.
| |
| getCascadables | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns the cascaded elements of this validatable, e.g. the properties of
a bean or the parameters of a method annotated with
| |
| getClassHierarchy | back to summary |
|---|---|
| public List Implements org.
| |
| getClassLevelConstraintsAsDescriptors | back to summary |
|---|---|
| private static Set | |
| getConstrainedConstructorsAsDescriptors | back to summary |
|---|---|
| private static Map | |
| getConstrainedMethodsAsDescriptors | back to summary |
|---|---|
| private static Map | |
| getConstrainedPropertiesAsDescriptors | back to summary |
|---|---|
| private static Map | |
| getDefaultGroupSequence | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the composition of the default group sequence. If the bean state is given in parameter and the bean metadata has a default group sequence provider then the dynamic default group sequence composition is returned. In the other cases the default group sequence redefinition specified by BV is used. | |
| getDefaultGroupSequenceData | back to summary |
|---|---|
| private static <T> BeanMetaDataImpl. | |
| getDefaultValidationSequence | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator over the default validation group sequence as configured through
| |
| getDirectConstraints | back to summary |
|---|---|
| private Set | |
| getDirectMetaConstraints | back to summary |
|---|---|
| public Set Implements org.
| |
| getMetaConstraints | back to summary |
|---|---|
| public Set Implements org.
| |
| getMetaDataFor | back to summary |
|---|---|
| public PropertyMetaData getMetaDataFor(String propertyName) Implements org. Doc from org. Returns constraint-related meta data for the given property of this bean.
| |
| getMetaDataFor | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Returns the constraint-related metadata for the given executable of the class represented by this bean metadata.
| |
| getValidDefaultGroupSequence | back to summary |
|---|---|
| private static List | |
| hasCascadables | back to summary |
|---|---|
| public boolean hasCascadables() Implements org. Doc from org. Returns
| |
| hasConstraints | back to summary |
|---|---|
| public boolean hasConstraints() Implements org. Doc from org. Returns
| |
| hasDefaultGroupSequenceProvider | back to summary |
|---|---|
| private boolean hasDefaultGroupSequenceProvider() | |
| isDefaultGroupSequenceRedefined | back to summary |
|---|---|
| public boolean isDefaultGroupSequenceRedefined() Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv List | |
| pack-priv DefaultGroupSequenceProvider | |
| pack-priv ValidationOrder |
| Access | Constructor and Description |
|---|---|
| private |
| defaultGroupSequence | back to summary |
|---|---|
| pack-priv List<Class<?>> defaultGroupSequence | |
| defaultGroupSequenceProvider | back to summary |
|---|---|
| pack-priv DefaultGroupSequenceProvider<? super T> defaultGroupSequenceProvider | |
| validationOrder | back to summary |
|---|---|
| pack-priv ValidationOrder validationOrder | |
| DefaultGroupSequenceContext | back to summary |
|---|---|
| private DefaultGroupSequenceContext() | |