Class ManagedTypesBeanRegistrationAotProcessor
java.lang.Object
org.springframework.data.aot.ManagedTypesBeanRegistrationAotProcessor
- All Implemented Interfaces:
BeanRegistrationAotProcessor, Aware, EnvironmentAware
public class ManagedTypesBeanRegistrationAotProcessor
extends Object
implements BeanRegistrationAotProcessor, EnvironmentAware
BeanRegistrationAotProcessor handling module ManagedTypes instances.
This AOT processor allows store specific handling of discovered types to be registered.- Since:
- 3.0
- Author:
- Christoph Strobl, John Blum
-
Field Summary
Fields inherited from interface BeanRegistrationAotProcessor
IGNORE_REGISTRATION_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureTypeContribution(Class<?> type, AotContext aotContext) Customization hook to configure theTypeContributorused to register the given type.protected BeanRegistrationAotContributioncontribute(AotContext aotContext, ManagedTypes managedTypes, RegisteredBean registeredBean) Hook to provide a customized flavor ofBeanRegistrationAotContribution.@Nullable Stringprotected booleanprotected booleanmatchesByType(@Nullable Class<?> beanType) protected booleanmatchesPrefix(@Nullable String beanName) @Nullable BeanRegistrationAotContributionprocessAheadOfTime(RegisteredBean registeredBean) protected voidregisterTypeHints(ResolvableType type, AotContext aotContext, GenerationContext generationContext) Hook to contribute configuration for a given type.voidsetEnvironment(Environment environment) voidsetModuleIdentifier(@Nullable String moduleIdentifier) protected Consumer<TypeCollector> Customization hook to configureTypeCollector.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BeanRegistrationAotProcessor
isBeanExcludedFromAotProcessing
-
Constructor Details
-
ManagedTypesBeanRegistrationAotProcessor
public ManagedTypesBeanRegistrationAotProcessor()
-
-
Method Details
-
setModuleIdentifier
-
getModuleIdentifier
-
setEnvironment
- Specified by:
setEnvironmentin interfaceEnvironmentAware
-
processAheadOfTime
- Specified by:
processAheadOfTimein interfaceBeanRegistrationAotProcessor
-
contribute
protected BeanRegistrationAotContribution contribute(AotContext aotContext, ManagedTypes managedTypes, RegisteredBean registeredBean) Hook to provide a customized flavor ofBeanRegistrationAotContribution. By overriding this method calls toregisterTypeHints(ResolvableType, AotContext, GenerationContext)might no longer be issued.- Parameters:
aotContext- never null.managedTypes- never null.- Returns:
- new instance of
BeanRegistrationAotContributionor null if nothing to do.
-
typeCollectorCustomizer
Customization hook to configureTypeCollector.- Returns:
- a
Consumerto customize theTypeCollector, must not be null. - Since:
- 4.0
-
registerTypeHints
protected void registerTypeHints(ResolvableType type, AotContext aotContext, GenerationContext generationContext) Hook to contribute configuration for a given type.- Parameters:
type- never null.generationContext- never null.
-
configureTypeContribution
Customization hook to configure theTypeContributorused to register the given type.- Parameters:
type- the class to configure the contribution for.aotContext- AOT context for type configuration.- Since:
- 4.0
-
isMatch
-
matchesByType
-
matchesPrefix
-