Interface BeanRegistrationAotContribution
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
AOT contribution from a
BeanRegistrationAotProcessor
used to register
a single bean definition.- Since:
- 6.0
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTo
(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode) Apply this contribution to the givenBeanRegistrationCode
.default BeanRegistrationCodeFragments
customizeBeanRegistrationCodeFragments
(GenerationContext generationContext, BeanRegistrationCodeFragments codeFragments) Customize theBeanRegistrationCodeFragments
that will be used to generate the bean registration code.ofBeanRegistrationCodeFragmentsCustomizer
(UnaryOperator<BeanRegistrationCodeFragments> beanRegistrationCodeFragmentsCustomizer) Factory method that can be used to create aBeanRegistrationAotContribution
that applies the givenBeanRegistrationCodeFragments
customizer.
-
Method Details
-
customizeBeanRegistrationCodeFragments
default BeanRegistrationCodeFragments customizeBeanRegistrationCodeFragments(GenerationContext generationContext, BeanRegistrationCodeFragments codeFragments) Customize theBeanRegistrationCodeFragments
that will be used to generate the bean registration code. Custom code fragments can be used if default code generation isn't suitable.- Parameters:
generationContext
- the generation contextcodeFragments
- the existing code fragments- Returns:
- the code fragments to use, may be the original instance or a wrapper
-
applyTo
Apply this contribution to the givenBeanRegistrationCode
.- Parameters:
generationContext
- the generation contextbeanRegistrationCode
- the generated registration
-
ofBeanRegistrationCodeFragmentsCustomizer
static BeanRegistrationAotContribution ofBeanRegistrationCodeFragmentsCustomizer(UnaryOperator<BeanRegistrationCodeFragments> beanRegistrationCodeFragmentsCustomizer) Factory method that can be used to create aBeanRegistrationAotContribution
that applies the givenBeanRegistrationCodeFragments
customizer.- Parameters:
beanRegistrationCodeFragmentsCustomizer
- theBeanRegistrationCodeFragments
customizer- Returns:
- a new
BeanRegistrationAotContribution
instance - See Also:
-