Top Description Fields Constructors Methods
org.springframework.beans.factory.aot

pack-priv Class BeanRegistrationCodeGenerator

extends Object
implements BeanRegistrationCode
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.aot.BeanRegistrationCode
Imports
java.util.ArrayList, .List, java.util.function.Predicate, org.springframework.aot.generate.GeneratedMethods, .GenerationContext, .MethodReference, org.springframework.beans.factory.support.RegisteredBean, org.springframework.javapoet.ClassName, .CodeBlock, org.springframework.util.Assert

BeanRegistrationCode implementation with code generation support.
Author
Phillip Webb
Since
6.0

Field Summary

Modifier and TypeField and Description
private final ClassName
private final BeanRegistrationCodeFragments
private final GeneratedMethods
private final List<MethodReference>
private final RegisteredBean
private static final Predicate<String>

Constructor Summary

AccessConstructor and Description
pack-priv
BeanRegistrationCodeGenerator(ClassName className, GeneratedMethods generatedMethods, RegisteredBean registeredBean, BeanRegistrationCodeFragments codeFragments)

Method Summary

Modifier and TypeMethod and Description
public void
addInstancePostProcessor(MethodReference
a reference to the post-process method to call. The referenced method must have a functional signature compatible with InstanceSupplier#andThen.
methodReference
)

Implements org.springframework.beans.factory.aot.BeanRegistrationCode.addInstancePostProcessor.

Add an instance post processor method call to the registration code.
pack-priv CodeBlock
generateCode(GenerationContext generationContext)

public ClassName
getClassName()

Implements org.springframework.beans.factory.aot.BeanRegistrationCode.getClassName.

Return the name of the class being used for registrations.
public GeneratedMethods
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classNameback to summary
private final ClassName className
codeFragmentsback to summary
private final BeanRegistrationCodeFragments codeFragments
generatedMethodsback to summary
private final GeneratedMethods generatedMethods
instancePostProcessorsback to summary
private final List<MethodReference> instancePostProcessors
registeredBeanback to summary
private final RegisteredBean registeredBean
REJECT_ALL_ATTRIBUTES_FILTERback to summary
private static final Predicate<String> REJECT_ALL_ATTRIBUTES_FILTER

Constructor Detail

BeanRegistrationCodeGeneratorback to summary
pack-priv BeanRegistrationCodeGenerator(ClassName className, GeneratedMethods generatedMethods, RegisteredBean registeredBean, BeanRegistrationCodeFragments codeFragments)

Method Detail

addInstancePostProcessorback to summary
public void addInstancePostProcessor(MethodReference methodReference)

Implements org.springframework.beans.factory.aot.BeanRegistrationCode.addInstancePostProcessor.

Doc from org.springframework.beans.factory.aot.BeanRegistrationCode.addInstancePostProcessor.

Add an instance post processor method call to the registration code.

Parameters
methodReference:MethodReference

a reference to the post-process method to call. The referenced method must have a functional signature compatible with InstanceSupplier#andThen.

Annotations
@Override
generateCodeback to summary
pack-priv CodeBlock generateCode(GenerationContext generationContext)
getClassNameback to summary
public ClassName getClassName()

Implements org.springframework.beans.factory.aot.BeanRegistrationCode.getClassName.

Doc from org.springframework.beans.factory.aot.BeanRegistrationCode.getClassName.

Return the name of the class being used for registrations.

Returns:ClassName

the name of the class

Annotations
@Override
getMethodsback to summary
public GeneratedMethods getMethods()

Implements org.springframework.beans.factory.aot.BeanRegistrationCode.getMethods.

Doc from org.springframework.beans.factory.aot.BeanRegistrationCode.getMethods.

Return a GeneratedMethods being used by the registrations code.

Returns:GeneratedMethods

the generated methods

Annotations
@Override