Actual retrieval of meta data is delegated to MetaDataProvider
implementations which load meta-data based e.g. based on annotations or XML.
For performance reasons a cache is used which stores all meta data once loaded for repeated retrieval. Upon initialization this cache is populated with meta data provided by the given eager providers. If the cache doesn't contain the meta data for a requested type it will be retrieved on demand using the annotation based provider.
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentReferenceHashMap | beanMetaDataCache
Used to cache the constraint meta data for validated entities |
| private final BeanMetaDataClassNormalizer | |
| private final ConstraintCreationContext | constraintCreationContext
The constraint creation context containing all the helpers necessary to the constraint creation. |
| private static final int | DEFAULT_CONCURRENCY_LEVEL
The default concurrency level for this cache. |
| private static final int | DEFAULT_INITIAL_CAPACITY
The default initial capacity for this cache. |
| private static final float | DEFAULT_LOAD_FACTOR
The default load factor for this cache. |
| private final ExecutableHelper | executableHelper
Used for resolving type parameters. |
| private final List | metaDataProviders
Additional metadata providers used for meta data retrieval if the XML and/or programmatic configuration is used. |
| private final MethodValidationConfiguration | methodValidationConfiguration
the three properties in this field affect the invocation of rules associated to section 4.5.5 of the specification. |
| private final ExecutableParameterNameProvider | |
| private final ValidationOrderGenerator |
| Access | Constructor and Description |
|---|---|
| public | BeanMetaDataManagerImpl(ConstraintCreationContext constraintCreationContext, ExecutableHelper executableHelper, ExecutableParameterNameProvider parameterNameProvider, JavaBeanHelper javaBeanHelper, BeanMetaDataClassNormalizer beanMetaDataClassNormalizer, ValidationOrderGenerator validationOrderGenerator, List<MetaDataProvider> optionalMetaDataProviders, MethodValidationConfiguration methodValidationConfiguration)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private < The type of interest. T> BeanMetaDataImpl | Returns: A bean meta data object for the given type.The type's class. clazz)Creates a |
| private AnnotationProcessingOptions | Returns: returns the annotation ignores from the non annotation based meta data providers
|
| private < The type of the class to get the configurations for. T> List | Returns: A set with the configurations for the complete hierarchy of the given type. May be empty, but nevernull.The type of interest. beanClass)Returns a list with the configurations for all types contained in the given type's hierarchy (including implemented interfaces) starting at the specified type. |
| public <T> BeanMetaData | getBeanMetaData(Class<T> beanClass)
Implements org. |
| public int |
| beanMetaDataCache | back to summary |
|---|---|
| private final ConcurrentReferenceHashMap<Class<?>, BeanMetaData<?>> beanMetaDataCache Used to cache the constraint meta data for validated entities | |
| beanMetaDataClassNormalizer | back to summary |
|---|---|
| private final BeanMetaDataClassNormalizer beanMetaDataClassNormalizer | |
| constraintCreationContext | back to summary |
|---|---|
| private final ConstraintCreationContext constraintCreationContext The constraint creation context containing all the helpers necessary to the constraint creation. | |
| DEFAULT_CONCURRENCY_LEVEL | back to summary |
|---|---|
| private static final int DEFAULT_CONCURRENCY_LEVEL The default concurrency level for this cache. | |
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_CAPACITY The default initial capacity for this cache. | |
| DEFAULT_LOAD_FACTOR | back to summary |
|---|---|
| private static final float DEFAULT_LOAD_FACTOR The default load factor for this cache. | |
| executableHelper | back to summary |
|---|---|
| private final ExecutableHelper executableHelper Used for resolving type parameters. Thread-safe. | |
| metaDataProviders | back to summary |
|---|---|
| private final List<MetaDataProvider> metaDataProviders Additional metadata providers used for meta data retrieval if the XML and/or programmatic configuration is used. | |
| methodValidationConfiguration | back to summary |
|---|---|
| private final MethodValidationConfiguration methodValidationConfiguration the three properties in this field affect the invocation of rules associated to section 4.5.5 of the specification. By default they are all false, if true they allow for relaxation of the Liskov Substitution Principal. | |
| parameterNameProvider | back to summary |
|---|---|
| private final ExecutableParameterNameProvider parameterNameProvider | |
| validationOrderGenerator | back to summary |
|---|---|
| private final ValidationOrderGenerator validationOrderGenerator | |
| BeanMetaDataManagerImpl | back to summary |
|---|---|
| public BeanMetaDataManagerImpl(ConstraintCreationContext constraintCreationContext, ExecutableHelper executableHelper, ExecutableParameterNameProvider parameterNameProvider, JavaBeanHelper javaBeanHelper, BeanMetaDataClassNormalizer beanMetaDataClassNormalizer, ValidationOrderGenerator validationOrderGenerator, List<MetaDataProvider> optionalMetaDataProviders, MethodValidationConfiguration methodValidationConfiguration) | |
| clear | back to summary |
|---|---|
| public void clear() Implements org.
| |
| createBeanMetaData | back to summary |
|---|---|
| private <T> BeanMetaDataImpl Creates a
| |
| getAnnotationProcessingOptionsFromNonDefaultProviders | back to summary |
|---|---|
private AnnotationProcessingOptions getAnnotationProcessingOptionsFromNonDefaultProviders(List<MetaDataProvider> optionalMetaDataProviders)
| |
| getBeanConfigurationForHierarchy | back to summary |
|---|---|
| private <T> List Returns a list with the configurations for all types contained in the given type's hierarchy (including implemented interfaces) starting at the specified type.
| |
| getBeanMetaData | back to summary |
|---|---|
| public <T> BeanMetaData Implements org.
| |
| numberOfCachedBeanMetaDataInstances | back to summary |
|---|---|
| public int numberOfCachedBeanMetaDataInstances() | |