@Override
  public Class<?> findClass(String name) {
    String classFileName = name.replace('.', '/') + ".class";
    InputStream originalStream = getResourceAsStream(classFileName);
    Preconditions.checkNotNull(originalStream, classFileName);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
      ByteStreams.copy(originalStream, baos);
      baos.flush();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    byte[] originalBytes = baos.toByteArray();
    byte[] instrumentedBytes;
    ClassLoader loader = InstrumentingClassLoader.class.getClassLoader();
    if (recordingClassName != null && recordingMethodName != null) {
      instrumentedBytes =
          AllocationInstrumenter.instrument(
              originalBytes, recordingClassName, recordingMethodName, loader);
    } else {
      instrumentedBytes = AllocationInstrumenter.instrument(originalBytes, loader);
    }

    return defineClass(name, instrumentedBytes, 0, instrumentedBytes.length);
  }
Call this to get an instrumented version of Instrumentee.
src/test/java/com/google/monitoring/runtime/instrumentation/InstrumentingClassLoader.java