Top Description Fields Constructors Methods
org.springframework.cglib.core

public Class ClassLoaderAwareGeneratorStrategy

extends DefaultGeneratorStrategy
Class Inheritance

CGLIB GeneratorStrategy variant which exposes the application ClassLoader as current thread context ClassLoader for the time of class generation. The ASM ClassWriter in Spring's ASM variant will pick it up when doing common superclass resolution.
Author
Juergen Hoeller
Since
5.2

Field Summary

Modifier and TypeField and Description
private final ClassLoader
Inherited from org.springframework.cglib.core.DefaultGeneratorStrategy:
INSTANCE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
Inherited from org.springframework.cglib.core.DefaultGeneratorStrategy:
getClassVisitorgetClassWritertransformtransform

Field Detail

classLoaderback to summary
private final ClassLoader classLoader

Constructor Detail

ClassLoaderAwareGeneratorStrategyback to summary
public ClassLoaderAwareGeneratorStrategy(ClassLoader classLoader)

Method Detail

generateback to summary
public byte[] generate(ClassGenerator cg) throws Exception

Overrides org.springframework.cglib.core.DefaultGeneratorStrategy.generate.

Implements org.springframework.cglib.core.GeneratorStrategy.generate.

Doc from org.springframework.cglib.core.GeneratorStrategy.generate.

Generate the class.

Parameters
cg:ClassGenerator

a class generator on which you can call ClassGenerator#generateClass

Returns:byte[]

a byte array containing the bits of a valid Class

Annotations
@Override