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

public abstract Class ClassHintUtils

extends Object
Class Inheritance
Imports
java.lang.reflect.Proxy, java.util.function.Consumer, org.springframework.aot.hint.MemberCategory, .RuntimeHints, .TypeHint, org.springframework.util.ClassUtils

Utilities for core hint inference on Spring-managed classes, specifically for proxy types such as interface-based JDK proxies and CGLIB-generated subclasses which need proxy/reflection hints.

Note that this class does not take specifics of Spring AOP or any other framework arrangement into account. It just operates on the JDK and CGLIB proxy facilities and their core conventions.

Authors
Juergen Hoeller, Sebastien Deleuze
Since
6.0.3
See Also
org.springframework.aot.hint.ProxyHints, org.springframework.aot.hint.ReflectionHints

Field Summary

Modifier and TypeField and Description
private static final Consumer<TypeHint.Builder>
private static final Consumer<TypeHint.Builder>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
registerProxyIfNecessary(Class<?>
the class to introspect
candidateClass
,
RuntimeHints
the RuntimeHints instance to register the hints on
runtimeHints
)

Register a proxy hint for a JDK proxy or corresponding reflection hints for a CGLIB-generated subclass, if necessary.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asClassBasedProxyback to summary
private static final Consumer<TypeHint.Builder> asClassBasedProxy
asProxiedUserClassback to summary
private static final Consumer<TypeHint.Builder> asProxiedUserClass

Constructor Detail

ClassHintUtilsback to summary
public ClassHintUtils()

Method Detail

registerProxyIfNecessaryback to summary
public static void registerProxyIfNecessary(Class<?> candidateClass, RuntimeHints runtimeHints)

Register a proxy hint for a JDK proxy or corresponding reflection hints for a CGLIB-generated subclass, if necessary.

Parameters
candidateClass:Class<?>

the class to introspect

runtimeHints:RuntimeHints

the RuntimeHints instance to register the hints on

See Also
Proxy#isProxyClass(Class), ClassUtils#getUserClass(Class)