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

pack-priv Class CglibClassHandler

extends Object
Class Inheritance
Imports
java.util.function.Consumer, org.springframework.aot.generate.GeneratedFiles, .GeneratedFiles.Kind, .GenerationContext, org.springframework.aot.hint.MemberCategory, .RuntimeHints, .TypeHint.Builder, .TypeReference, org.springframework.aot.hint.support.ClassHintUtils, org.springframework.cglib.core.ReflectUtils, org.springframework.core.io.ByteArrayResource

Handle CGLIB classes by adding them to a GenerationContext, and register the necessary hints so that they can be instantiated.
Author
Stephane Nicoll
Since
6.0
See Also
ReflectUtils#setGeneratedClassHandler, ReflectUtils#setLoadedClassHandler, ClassHintUtils#registerProxyIfNecessary

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
handleGeneratedClass(String
the name of the generated class
cglibClassName
,
byte[]
the bytecode of the generated class
content
)

Handle the specified generated CGLIB class.

public void
handleLoadedClass(Class<?>
a cglib class that has been loaded
cglibClass
)

Handle the specified loaded CGLIB class.

private void
registerHints(TypeReference cglibTypeReference)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

generatedFilesback to summary
private final GeneratedFiles generatedFiles
instantiateCglibProxyback to summary
private static final Consumer<TypeHint.Builder> instantiateCglibProxy
runtimeHintsback to summary
private final RuntimeHints runtimeHints

Constructor Detail

CglibClassHandlerback to summary
pack-priv CglibClassHandler(GenerationContext generationContext)

Method Detail

handleGeneratedClassback to summary
public void handleGeneratedClass(String cglibClassName, byte[] content)

Handle the specified generated CGLIB class.

Parameters
cglibClassName:String

the name of the generated class

content:byte[]

the bytecode of the generated class

handleLoadedClassback to summary
public void handleLoadedClass(Class<?> cglibClass)

Handle the specified loaded CGLIB class.

Parameters
cglibClass:Class<?>

a cglib class that has been loaded

registerHintsback to summary
private void registerHints(TypeReference cglibTypeReference)