Top Description Inners Fields Constructors Methods
org.springframework.validation.beanvalidation

pack-priv Class BeanValidationBeanRegistrationAotProcessor

extends Object
implements BeanRegistrationAotProcessor
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.aot.BeanRegistrationAotProcessor
Imports
java.util.Collection, .HashSet, .Set, jakarta.validation.ConstraintValidator, .NoProviderFoundException, .Validation, .Validator, jakarta.validation.metadata.BeanDescriptor, .ConstraintDescriptor, .ConstructorDescriptor, .MethodDescriptor, .MethodType, .ParameterDescriptor, .PropertyDescriptor, org.apache.commons.logging.Log, .LogFactory, org.springframework.aot.generate.GenerationContext, org.springframework.aot.hint.MemberCategory, org.springframework.beans.factory.aot.BeanRegistrationAotContribution, .BeanRegistrationAotProcessor, .BeanRegistrationCode, org.springframework.beans.factory.support.RegisteredBean, org.springframework.core.KotlinDetector, org.springframework.lang.Nullable, org.springframework.util.ClassUtils

AOT BeanRegistrationAotProcessor that adds additional hints required for ConstraintValidators.
Authors
Sebastien Deleuze, Juergen Hoeller
Since
6.0.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
BeanValidationBeanRegistrationAotProcessor.BeanValidationDelegate

Inner class to avoid a hard dependency on the Bean Validation API at runtime.

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final Log

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BeanRegistrationAotContribution
processAheadOfTime(RegisteredBean
the registered bean to process
registeredBean
)

Implements org.springframework.beans.factory.aot.BeanRegistrationAotProcessor.processAheadOfTime.

Process the given RegisteredBean instance ahead-of-time and return a contribution or null.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanValidationPresentback to summary
private static final boolean beanValidationPresent
loggerback to summary
private static final Log logger

Constructor Detail

BeanValidationBeanRegistrationAotProcessorback to summary
pack-priv BeanValidationBeanRegistrationAotProcessor()

Method Detail

processAheadOfTimeback to summary
public BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean)

Implements org.springframework.beans.factory.aot.BeanRegistrationAotProcessor.processAheadOfTime.

Doc from org.springframework.beans.factory.aot.BeanRegistrationAotProcessor.processAheadOfTime.

Process the given RegisteredBean instance ahead-of-time and return a contribution or null.

Processors are free to use any techniques they like to analyze the given instance. Most typically use reflection to find fields or methods to use in the contribution. Contributions typically generate source code or resource files that can be used when the AOT optimized application runs.

If the given instance isn't relevant to the processor, it should return a null contribution.

Parameters
registeredBean:RegisteredBean

the registered bean to process

Returns:BeanRegistrationAotContribution

a BeanRegistrationAotContribution or null

Annotations
@Override
@Nullable
org.springframework.validation.beanvalidation back to summary

private Class BeanValidationBeanRegistrationAotProcessor.AotContribution

extends Object
implements BeanRegistrationAotContribution
Class Inheritance
  • java.lang.Object
  • org.springframework.validation.beanvalidation.BeanValidationBeanRegistrationAotProcessor.AotContribution
All Implemented Interfaces
org.springframework.beans.factory.aot.BeanRegistrationAotContribution

Field Summary

Modifier and TypeField and Description
private final Collection<ConstraintDescriptor<?>>

Constructor Summary

AccessConstructor and Description
public
AotContribution(Collection<ConstraintDescriptor<?>> constraintDescriptors)

Method Summary

Modifier and TypeMethod and Description
public void
applyTo(GenerationContext
the generation context
generationContext
,
BeanRegistrationCode
the generated registration
beanRegistrationCode
)

Implements org.springframework.beans.factory.aot.BeanRegistrationAotContribution.applyTo.

Apply this contribution to the given BeanRegistrationCode.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constraintDescriptorsback to summary
private final Collection<ConstraintDescriptor<?>> constraintDescriptors

Constructor Detail

AotContributionback to summary
public AotContribution(Collection<ConstraintDescriptor<?>> constraintDescriptors)

Method Detail

applyToback to summary
public void applyTo(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode)

Implements org.springframework.beans.factory.aot.BeanRegistrationAotContribution.applyTo.

Doc from org.springframework.beans.factory.aot.BeanRegistrationAotContribution.applyTo.

Apply this contribution to the given BeanRegistrationCode.

Parameters
generationContext:GenerationContext

the generation context

beanRegistrationCode:BeanRegistrationCode

the generated registration

Annotations
@Override
org.springframework.validation.beanvalidation back to summary

private Class BeanValidationBeanRegistrationAotProcessor.BeanValidationDelegate

extends Object
Class Inheritance
  • java.lang.Object
  • org.springframework.validation.beanvalidation.BeanValidationBeanRegistrationAotProcessor.BeanValidationDelegate

Inner class to avoid a hard dependency on the Bean Validation API at runtime.

Field Summary

Modifier and TypeField and Description
private static final Validator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Validator
public static BeanRegistrationAotContribution
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

validatorback to summary
private static final Validator validator
Annotations
@Nullable

Constructor Detail

BeanValidationDelegateback to summary
private BeanValidationDelegate()

Method Detail

getValidatorIfAvailableback to summary
private static Validator getValidatorIfAvailable()
Annotations
@Nullable
processAheadOfTimeback to summary
public static BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean)
Annotations
@Nullable