docs: static byte[] generateClassBytes(String stubClassName,
                                       Class<?> remoteInterface,
                                       Method[] remoteMethods,
                                       String[] idlNames,
                                       int rmicCompatible) throws EJBConfigurationException {
          String[] remoteInterfaceNames;
          int numMethods = remoteMethods.length;
  
          // ASM uses 'internal' java class names (like JNI) where '/' is
          // used instead of '.', so convert the parameters to 'internal' format.
          String internalStubClassName = convertClassName(stubClassName);
          String internalInterfaceName = convertClassName(remoteInterface.getName());
  
          // Stubs may only be generated for interfaces.                     d458392
          if (!Modifier.isInterface(remoteInterface.getModifiers())) {
              throw new EJBConfigurationException("The " + remoteInterface.getName() + " class is not an interface class. " +
                                                  "Stubs may only be generated for interface classes.");
          }
  
          // Remote Business interfaces may or may not extend java.rmi.Remote
          boolean isRmiRemote = (Remote.class).isAssignableFrom(remoteInterface);
          boolean isAbstractInterface = isRmiRemote || CORBA_Utils.isAbstractInterface(remoteInterface, rmicCompatible);
  
          // The ORB requires that all stubs implement java.rmi.Remote, so add
          // that in for those EJB 'business' remote interfaces that do not.
          // The methods will NOT throw RemoteException, but the generated
          // stub implementation will handle that.                         d413752.1
          if (isRmiRemote)
              remoteInterfaceNames = new String[] { internalInterfaceName };
          else
              remoteInterfaceNames = new String[] { internalInterfaceName, "java/rmi/Remote" };
  
          // The set of classes that are used as constants.  Support for the
          // CONSTANT_Class type for the "ldc" opcode was not added to the class
          // file format until 1.5.  Prior to that, class files must generate
          // synthetic fields for each class constant, and then invoke a synthetic
          // class$() method that calls Class.forName.                      d676434
          Set<String> classConstantFieldNames = new LinkedHashSet<String>();
  
          Class<?>[][] checkedExceptions = new Class<?>[numMethods][];
          for (int i = 0; i < numMethods; ++i) {
              checkedExceptions[i] = DeploymentUtil.getCheckedExceptions(remoteMethods[i],
                                                                         isRmiRemote,
                                                                         DeploymentUtil.DeploymentTarget.STUB); // d660332
          }
  
          if (TraceComponent.isAnyTracingEnabled()) {
              if (tc.isEntryEnabled())
                  Tr.entry(tc, "generateClassBytes");
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, INDENT + "className = " + internalStubClassName);
                  Tr.debug(tc, INDENT + "interface = " + internalInterfaceName);
                  if (isRmiRemote)
                      Tr.debug(tc, INDENT + "implements java.rmi.Remote");
              }
          }
  
          // Create the ASM Class Writer to write out a Stub
          ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); //F743-11995
  
          // Define the Stub Class object
          cw.visit(V1_2, ACC_PUBLIC + ACC_SUPER,
                   internalStubClassName,
                   null,
                   isAbstractInterface ? "javax/rmi/CORBA/Stub" : "com/ibm/ejs/container/SerializableStub", // PM46698
                   remoteInterfaceNames);
  
          // Define the source code file and debug settings
          String sourceFileName = stubClassName.substring(stubClassName.lastIndexOf(".") + 1) + ".java";
          cw.visitSource(sourceFileName, null);
  
          // Add the static and instance variables common to all Stubs.
          addFields(cw);
  
          // Initialize the static fields common to all Stubs.
          initializeStaticFields(cw, internalStubClassName, remoteInterface);
  
          // Add the public no parameter Stub constructor
          addCtor(cw, internalStubClassName, classConstantFieldNames, // RTC111522
                  remoteInterface, isAbstractInterface);
  
          // Add the methods common to all Stub classes.
          addCommonStubMethods(cw, internalStubClassName);
  
          // Add all of the methods to the Stub, based on the reflected
          // Method objects from the interface.
          for (int i = 0; i < numMethods; ++i) {
              addStubMethod(cw,
                            internalStubClassName,
                            classConstantFieldNames, // RTC111522
                            remoteMethods[i],
                            checkedExceptions[i], // d676434
                            idlNames[i],
                            isRmiRemote,
                            rmicCompatible);
          }
  
          // Add class constants fields and methods.                       RTC111522
          JITUtils.addClassConstantMembers(cw, classConstantFieldNames);
  
          // Mark the end of the generated wrapper class
          cw.visitEnd();
  
          // Dump the class bytes out to a byte array.
          byte[] classBytes = cw.toByteArray();
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              writeToClassFile(internalStubClassName, classBytes);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "generateClassBytes: " + classBytes.length + " bytes");
  
          return classBytes;
      }