ValueExtractors, and caches for these
extractors based on container types.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Log | |
| private final Set | |
| private final ConcurrentHashMap | |
| private final ConcurrentHashMap | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private TypeVariable | |
| private boolean | checkValueExtractorTypeCompatibility(TypeVariable<?> typeParameter, boolean isInternal, Class<?> erasedDeclaredType, ValueExtractorDescriptor extractorDescriptor)
|
| public void | |
| public ValueExtractorDescriptor | getMaximallySpecificAndContainerElementCompliantValueExtractor(Class<?> declaredType, TypeVariable<?> typeParameter)
Used to find the maximally specific and container element compliant value extractor based on the declared type and the type parameter. |
| public ValueExtractorDescriptor | getMaximallySpecificAndRuntimeContainerElementCompliantValueExtractor(Type declaredType, TypeVariable<?> typeParameter, Class<?> runtimeType, Collection<ValueExtractorDescriptor> valueExtractorCandidates)
Used to find the maximally specific and container element compliant value extractor based on the runtime type. |
| public ValueExtractorDescriptor | getMaximallySpecificValueExtractorForAllContainerElements(Class<?> runtimeType, Set<ValueExtractorDescriptor> potentialValueExtractorDescriptors)
Used to determine if the passed runtime type is a container and if so return a corresponding maximally specific value extractor. |
| public Set | getMaximallySpecificValueExtractors(Class<?> declaredType)
Used to find all the maximally specific value extractors based on a declared type in the case of value unwrapping. |
| private Set | |
| private Set | getPotentiallyRuntimeTypeCompliantAndContainerElementCompliantValueExtractors(Type declaredType, TypeVariable<?> typeParameter)
Returns the set of potentially type-compliant and container-element-compliant value extractors or an empty set if none was found. |
| public Set | Returns: a set ofValueExtractorDescriptors that possibly might be applied to a declaredType
at a runtime.Used to determine the value extractors which potentially could be applied to the runtime type of a given declared type. |
| private Set | getRuntimeAndContainerElementCompliantValueExtractorsFromPossibleCandidates(Type declaredType, TypeVariable<?> typeParameter, Class<?> runtimeType, Collection<ValueExtractorDescriptor> valueExtractorCandidates)
|
| private Set | Returns: a set of runtime compliant value extractors based on a runtime type. If there are no available value extractors an empty set will be returned which means the type is not a container.
|
| private ValueExtractorDescriptor | getUniqueValueExtractorOrThrowException(Class<?> runtimeType, Set<ValueExtractorDescriptor> maximallySpecificContainerElementCompliantValueExtractors)
|
| public Set | getValueExtractorCandidatesForCascadedValidation(Type declaredType, TypeVariable<?> typeParameter)
Used to determine the value extractor candidates valid for a declared type and type variable. |
| public Set | getValueExtractorCandidatesForContainerDetectionOfGlobalCascadedValidation(Type enclosingType)
Used to determine the possible value extractors that can be applied to a declared type. |
| private boolean | validateValueExtractorCompatibility(boolean isInternal, Class<?> typeForBinding, Class<?> typeToBind, TypeVariable<?> typeParameterForBinding, TypeVariable<?> typeParameterToCompare)
|
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| nonContainerTypes | back to summary |
|---|---|
| private final Set<Class<?>> nonContainerTypes | |
| possibleValueExtractorsByRuntimeType | back to summary |
|---|---|
| private final ConcurrentHashMap<Class<?>, Set<ValueExtractorDescriptor>> possibleValueExtractorsByRuntimeType | |
| possibleValueExtractorsByRuntimeTypeAndTypeParameter | back to summary |
|---|---|
| private final ConcurrentHashMap<ValueExtractorResolver. | |
| registeredValueExtractors | back to summary |
|---|---|
| private final Set<ValueExtractorDescriptor> registeredValueExtractors
| |
| ValueExtractorResolver | back to summary |
|---|---|
| pack-priv ValueExtractorResolver(Set<ValueExtractorDescriptor> valueExtractors) | |
| bind | back to summary |
|---|---|
| private TypeVariable | |
| checkValueExtractorTypeCompatibility | back to summary |
|---|---|
| private boolean checkValueExtractorTypeCompatibility(TypeVariable<?> typeParameter, boolean isInternal, Class<?> erasedDeclaredType, ValueExtractorDescriptor extractorDescriptor) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| getMaximallySpecificAndContainerElementCompliantValueExtractor | back to summary |
|---|---|
| public ValueExtractorDescriptor getMaximallySpecificAndContainerElementCompliantValueExtractor(Class<?> declaredType, TypeVariable<?> typeParameter) Used to find the maximally specific and container element compliant value extractor based on the declared type and the type parameter. Used for container element constraints.
| |
| getMaximallySpecificAndRuntimeContainerElementCompliantValueExtractor | back to summary |
|---|---|
| public ValueExtractorDescriptor getMaximallySpecificAndRuntimeContainerElementCompliantValueExtractor(Type declaredType, TypeVariable<?> typeParameter, Class<?> runtimeType, Collection<ValueExtractorDescriptor> valueExtractorCandidates) Used to find the maximally specific and container element compliant value extractor based on the runtime type. The maximally specific one is chosen among the candidates passed to this method. Used for cascading validation.
| |
| getMaximallySpecificValueExtractorForAllContainerElements | back to summary |
|---|---|
| public ValueExtractorDescriptor getMaximallySpecificValueExtractorForAllContainerElements(Class<?> runtimeType, Set<ValueExtractorDescriptor> potentialValueExtractorDescriptors) Used to determine if the passed runtime type is a container and if so return a corresponding maximally specific value extractor. Obviously, it only works if there's only one value extractor corresponding to the runtime type as we don't precise any type parameter.
There is a special case: when the passed type is assignable to a
Used for cascading validation when the
| |
| getMaximallySpecificValueExtractors | back to summary |
|---|---|
| public Set Used to find all the maximally specific value extractors based on a declared type in the case of value unwrapping. There might be several of them as there might be several type parameters. Used for container element constraints. | |
| getMaximallySpecificValueExtractors | back to summary |
|---|---|
| private Set | |
| getPotentiallyRuntimeTypeCompliantAndContainerElementCompliantValueExtractors | back to summary |
|---|---|
| private Set Returns the set of potentially type-compliant and container-element-compliant value extractors or an empty set if none was found. A value extractor is potentially runtime type compliant if it might be compliant for any runtime type that matches the declared type. | |
| getPotentialValueExtractorCandidatesForCascadedValidation | back to summary |
|---|---|
| public Set Used to determine the value extractors which potentially could be applied to the runtime type of a given declared type.
An example could be when there's a declaration like
Returned set of extractors is used to determine if at runtime a value extractor can be applied to a runtime type,
and if
| |
| getRuntimeAndContainerElementCompliantValueExtractorsFromPossibleCandidates | back to summary |
|---|---|
| private Set | |
| getRuntimeCompliantValueExtractors | back to summary |
|---|---|
private Set
| |
| getUniqueValueExtractorOrThrowException | back to summary |
|---|---|
| private ValueExtractorDescriptor getUniqueValueExtractorOrThrowException(Class<?> runtimeType, Set<ValueExtractorDescriptor> maximallySpecificContainerElementCompliantValueExtractors) | |
| getValueExtractorCandidatesForCascadedValidation | back to summary |
|---|---|
| public Set Used to determine the value extractor candidates valid for a declared type and type variable. The effective value extractor will be narrowed from these candidates using the runtime type. Used to optimize the choice of the value extractor in the case of cascading validation. | |
| getValueExtractorCandidatesForContainerDetectionOfGlobalCascadedValidation | back to summary |
|---|---|
| public Set Used to determine the possible value extractors that can be applied to a declared type.
Used when building cascading metadata in
An example could be when we need to upgrade BV 1.1 style Searches only for maximally specific value extractors based on a type.
Types that are assignable to | |
| validateValueExtractorCompatibility | back to summary |
|---|---|
| private boolean validateValueExtractorCompatibility(boolean isInternal, Class<?> typeForBinding, Class<?> typeToBind, TypeVariable<?> typeParameterForBinding, TypeVariable<?> typeParameterToCompare) | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Class | |
| private TypeVariable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int |
| hashCode | back to summary |
|---|---|
| private int hashCode | |
| type | back to summary |
|---|---|
| private Class<?> type | |
| typeParameter | back to summary |
|---|---|
| private TypeVariable<?> typeParameter | |
| ValueExtractorCacheKey | back to summary |
|---|---|
| pack-priv ValueExtractorCacheKey(Class<?> type, TypeVariable<?> typeParameter) | |
| buildHashCode | back to summary |
|---|---|
| private int buildHashCode() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |