org.elasticsearch.common.inject.internal
Class BytecodeGen

java.lang.Object
  extended by org.elasticsearch.common.inject.internal.BytecodeGen

public final class BytecodeGen
extends java.lang.Object

Utility methods for runtime code generation and class loading. We use this stuff for faster reflection, method interceptors and to proxy circular dependencies.

When loading classes, we need to be careful of:

For each generated class, there's multiple class loaders involved:


Nested Class Summary
static class BytecodeGen.Visibility
          The required visibility of a user's class from a Guice-generated class.
 
Constructor Summary
BytecodeGen()
           
 
Method Summary
static java.lang.ClassLoader getClassLoader(java.lang.Class<?> type)
          Returns the class loader to host generated classes for type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytecodeGen

public BytecodeGen()
Method Detail

getClassLoader

public static java.lang.ClassLoader getClassLoader(java.lang.Class<?> type)
Returns the class loader to host generated classes for type.