Class RepositoryRegistrationAotContribution
java.lang.Object
org.springframework.data.repository.config.RepositoryRegistrationAotContribution
- All Implemented Interfaces:
BeanRegistrationAotContribution
public class RepositoryRegistrationAotContribution
extends Object
implements BeanRegistrationAotContribution
BeanRegistrationAotContribution used to contribute repository registrations.- Since:
- 3.0
- Author:
- John Blum
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRepositoryRegistrationAotContribution(RepositoryRegistrationAotProcessor repositoryRegistrationAotProcessor) Constructs a new instance of theRepositoryRegistrationAotContributioninitialized with the given, requiredRepositoryRegistrationAotProcessorfrom which this contribution was created. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode) buildAotRepositoryContext(RegisteredBean bean, RepositoryConfiguration<?> repositoryMetadata) forBean(RegisteredBean repositoryBean) Builds aRepositoryRegistrationAotContributionfor given, requiredRegisteredBeanrepresenting theRepositoryregistered in the bean registry.fromProcessor(RepositoryRegistrationAotProcessor repositoryRegistrationAotProcessor) Factory method used to construct a new instance ofRepositoryRegistrationAotContributioninitialized with the given, requiredRepositoryRegistrationAotProcessorfrom which this contribution was created.protected ConfigurableListableBeanFactoryprotected Optional<BiConsumer<AotRepositoryContext,GenerationContext>> protected AotRepositoryContextprotected RepositoryRegistrationAotProcessorwithModuleContribution(BiConsumer<AotRepositoryContext, GenerationContext> moduleContribution) Callbackfor data module specific contributions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.aot.BeanRegistrationAotContribution
customizeBeanRegistrationCodeFragments
-
Constructor Details
-
RepositoryRegistrationAotContribution
protected RepositoryRegistrationAotContribution(RepositoryRegistrationAotProcessor repositoryRegistrationAotProcessor) Constructs a new instance of theRepositoryRegistrationAotContributioninitialized with the given, requiredRepositoryRegistrationAotProcessorfrom which this contribution was created.- Parameters:
repositoryRegistrationAotProcessor- reference back to theRepositoryRegistrationAotProcessorfrom which this contribution was created.- Throws:
IllegalArgumentException- if theRepositoryRegistrationAotProcessoris null.- See Also:
-
-
Method Details
-
fromProcessor
public static RepositoryRegistrationAotContribution fromProcessor(RepositoryRegistrationAotProcessor repositoryRegistrationAotProcessor) Factory method used to construct a new instance ofRepositoryRegistrationAotContributioninitialized with the given, requiredRepositoryRegistrationAotProcessorfrom which this contribution was created.- Parameters:
repositoryRegistrationAotProcessor- reference back to theRepositoryRegistrationAotProcessorfrom which this contribution was created.- Returns:
- a new instance of
RepositoryRegistrationAotContribution. - Throws:
IllegalArgumentException- if theRepositoryRegistrationAotProcessoris null.- See Also:
-
getBeanFactory
-
getModuleContribution
-
getRepositoryContext
-
getRepositoryRegistrationAotProcessor
-
getRepositoryInformation
-
forBean
Builds aRepositoryRegistrationAotContributionfor given, requiredRegisteredBeanrepresenting theRepositoryregistered in the bean registry.- Parameters:
repositoryBean-RegisteredBeanfor theRepository; must not be null.- Returns:
- a
RepositoryRegistrationAotContributionto contribute AOT metadata and code for theRepositoryRegisteredBean. - Throws:
IllegalArgumentException- if theRegisteredBeanis null.- See Also:
-
buildAotRepositoryContext
protected org.springframework.data.repository.config.DefaultAotRepositoryContext buildAotRepositoryContext(RegisteredBean bean, RepositoryConfiguration<?> repositoryMetadata) -
withModuleContribution
public RepositoryRegistrationAotContribution withModuleContribution(@Nullable BiConsumer<AotRepositoryContext, GenerationContext> moduleContribution) Callbackfor data module specific contributions.- Parameters:
moduleContribution-BiConsumerused by data modules to submit contributions; can be null.- Returns:
- this.
-
applyTo
- Specified by:
applyToin interfaceBeanRegistrationAotContribution
-
typeFilter
-