Top Description Inners Constructors Methods
org.springframework.context.aot

pack-priv Class KotlinReflectionBeanRegistrationAotProcessor

extends Object
implements BeanRegistrationAotProcessor
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.aot.BeanRegistrationAotProcessor
Imports
org.springframework.aot.generate.GenerationContext, org.springframework.aot.hint.MemberCategory, .RuntimeHints, org.springframework.beans.factory.aot.BeanRegistrationAotContribution, .BeanRegistrationAotProcessor, .BeanRegistrationCode, org.springframework.beans.factory.support.RegisteredBean, org.springframework.core.KotlinDetector, org.springframework.lang.Nullable

AOT BeanRegistrationAotProcessor that adds additional hints required by Kotlin reflection.
Author
Sebastien Deleuze
Since
6.0.4

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

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

Constructor Detail

KotlinReflectionBeanRegistrationAotProcessorback to summary
pack-priv KotlinReflectionBeanRegistrationAotProcessor()

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
@Nullable
@Override
org.springframework.context.aot back to summary

private Class KotlinReflectionBeanRegistrationAotProcessor.AotContribution

extends Object
implements BeanRegistrationAotContribution
Class Inheritance
  • java.lang.Object
  • org.springframework.context.aot.KotlinReflectionBeanRegistrationAotProcessor.AotContribution
All Implemented Interfaces
org.springframework.beans.factory.aot.BeanRegistrationAotContribution

Field Summary

Modifier and TypeField and Description
private final Class<?>

Constructor Summary

AccessConstructor and Description
public
AotContribution(Class<?> beanClass)

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.
private void
registerHints(Class<?> type, RuntimeHints runtimeHints)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanClassback to summary
private final Class<?> beanClass

Constructor Detail

AotContributionback to summary
public AotContribution(Class<?> beanClass)

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
registerHintsback to summary
private void registerHints(Class<?> type, RuntimeHints runtimeHints)