code: private static synchronized Class<?> getMergedClass(ClassInjector injector,
                                                          ClassEntry[] classEntries,
                                                          Class<?>[] interfaces,
                                                          int observerMode)
          throws IllegalArgumentException
      {
          Map<MultiKey, String> classListMap = cMergedMap.get(injector);
          if (classListMap == null) {
              classListMap = new HashMap<MultiKey, String>(7);
              cMergedMap.put(injector, classListMap);
          }
  
          MultiKey key = generateKey(classEntries);
          String mergedName = classListMap.get(key);
          if (mergedName != null) {
              try {
                  return injector.loadClass(mergedName);
              }
              catch (ClassNotFoundException e) {
              }
          }
  
          ClassFile cf;
          try {
              cf = buildClassFile(injector, null, classEntries, interfaces, 
                                  observerMode);
          }
          catch (IllegalArgumentException e) {
              e.fillInStackTrace();
              throw e;
          }
  
          try {
              OutputStream stream = injector.getStream(cf.getClassName());
              cf.writeTo(stream);
              stream.close();
          }
          catch (Throwable e) {
              String output = outputClassToFile(cf);
              throw new RuntimeException(
                  "Error generating merged class, contents saved to: " + output, 
                  e
              );
          }
  
          if (DEBUG) {
              String output = outputClassToFile(cf);
              System.out.println("Saved merged class to: " + output);
          }
          
          Class<?> merged;
          try {
              merged = injector.loadClass(cf.getClassName());
          }
          catch (ClassNotFoundException e) {
              throw new InternalError(e.toString());
          }
  
          classListMap.put(key, merged.getName());
          return merged;
      }
docs: Creates a class with a public constructor whose parameter types match
  the given source classes. Another constructor is also created that
  accepts an InstanceFactory.