code: public static ByteCodeGenerator createWithCurrentThreadContextClassLoader() {
          final ClassPool pool = ClassPool.getDefault();
          final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
          pool.appendClassPath(new LoaderClassPath(classLoader));
          return new ByteCodeGenerator(pool, classLoader);
      }
docs: Creates a generator initialized with default class pool and the context
  class loader of the current thread.
  
  @return New byte code generator instance.