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.Visibility
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<?> type)
Returns the class loader to host generated classes for
type . |
static net.sf.cglib.proxy.Enhancer |
newEnhancer(Class<?> type,
BytecodeGen.Visibility visibility) |
static net.sf.cglib.reflect.FastClass |
newFastClass(Class<?> type,
BytecodeGen.Visibility visibility) |
public static ClassLoader getClassLoader(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)
Copyright © 2006-2014 Google, Inc.. All Rights Reserved.