public final class BytecodeGen extends Object
faster reflection,
method interceptors and to proxy circular dependencies.
When loading classes, we need to be careful of:
OSGi use class loader boundaries to enforce modularity at runtime. For each generated class, there's multiple class loaders involved:
| Modifier and Type | Class and Description |
|---|---|
static class |
BytecodeGen
The required visibility of a user's class from a Guice-generated class.
|
| Constructor and Description |
|---|
BytecodeGen()
|
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
getClassLoader(Class
Returns the class loader to host generated classes for
type.
|
static net.sf.cglib.proxy.Enhancer |
newEnhancer(Class
|
static net.sf.cglib.reflect.FastClass |
newFastClass(Class
|
public static ClassLoadergetClassLoader(Class <?> type)
type.
public static net.sf.cglib.reflect.FastClass newFastClass(Class<?> type, BytecodeGen .Visibility visibility)
public static net.sf.cglib.proxy.Enhancer newEnhancer(Class<?> type, BytecodeGen .Visibility visibility)