Top Description Inners Fields Constructors Methods
org.springframework.aot.hint

public Class BindingReflectionHintsRegistrar

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.AnnotatedElement, .Field, .Method, .RecordComponent, .Type, java.util.LinkedHashSet, .Set, java.util.function.Consumer, kotlin.jvm.JvmClassMappingKt, kotlin.reflect.KClass, org.springframework.core.KotlinDetector, .MethodParameter, .ResolvableType, org.springframework.core.annotation.MergedAnnotation, .MergedAnnotations, org.springframework.lang.Nullable, org.springframework.util.ClassUtils, .ReflectionUtils

Register the necessary reflection hints so that the specified type can be bound at runtime. Fields, constructors, properties, and record components are registered, except for a set of types like those in the java. package where just the type is registered. Types are discovered transitively on properties and record components, and generic types are registered as well.
Author
Sebastien Deleuze
Since
6.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
BindingReflectionHintsRegistrar.KotlinDelegate

Inner class to avoid a hard dependency on Kotlin at runtime.

Field Summary

Modifier and TypeField and Description
private static final String
private static final boolean
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
collectReferencedTypes(Set<Class<?>> types, ResolvableType resolvableType)

private void
private void
private void
private void
private void
registerPropertyHints(ReflectionHints hints, Set<Type> seen, Method method, int parameterIndex)

private void
public void
registerReflectionHints(ReflectionHints
the hints instance to use
hints
,
Type...
the types to register
types
)

Register the necessary reflection hints to bind the specified types.

private void
private boolean
private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JACKSON_ANNOTATIONback to summary
private static final String JACKSON_ANNOTATION
jacksonAnnotationPresentback to summary
private static final boolean jacksonAnnotationPresent
KOTLIN_COMPANION_SUFFIXback to summary
private static final String KOTLIN_COMPANION_SUFFIX

Constructor Detail

BindingReflectionHintsRegistrarback to summary
public BindingReflectionHintsRegistrar()

Method Detail

collectReferencedTypesback to summary
private void collectReferencedTypes(Set<Class<?>> types, ResolvableType resolvableType)
forEachJacksonAnnotationback to summary
private void forEachJacksonAnnotation(AnnotatedElement element, Consumer<MergedAnnotation<Annotation>> action)
registerHintsForClassAttributesback to summary
private void registerHintsForClassAttributes(ReflectionHints hints, MergedAnnotation<Annotation> annotation)
registerJacksonHintsback to summary
private void registerJacksonHints(ReflectionHints hints, Class<?> clazz)
registerKotlinSerializationHintsback to summary
private void registerKotlinSerializationHints(ReflectionHints hints, Class<?> clazz)
registerPropertyHintsback to summary
private void registerPropertyHints(ReflectionHints hints, Set<Type> seen, Method method, int parameterIndex)
registerRecordHintsback to summary
private void registerRecordHints(ReflectionHints hints, Set<Type> seen, Method method)
registerReflectionHintsback to summary
public void registerReflectionHints(ReflectionHints hints, Type... types)

Register the necessary reflection hints to bind the specified types.

Parameters
hints:ReflectionHints

the hints instance to use

types:Type[]

the types to register

registerReflectionHintsback to summary
private void registerReflectionHints(ReflectionHints hints, Set<Type> seen, Type type)
shouldSkipMembersback to summary
private boolean shouldSkipMembers(Class<?> type)
shouldSkipTypeback to summary
private boolean shouldSkipType(Class<?> type)
org.springframework.aot.hint back to summary

private Class BindingReflectionHintsRegistrar.KotlinDelegate

extends Object
Class Inheritance
  • java.lang.Object
  • org.springframework.aot.hint.BindingReflectionHintsRegistrar.KotlinDelegate

Inner class to avoid a hard dependency on Kotlin at runtime.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KotlinDelegateback to summary
private KotlinDelegate()

Method Detail

registerComponentHintsback to summary
public static void registerComponentHints(ReflectionHints hints, Class<?> type)