docs: public Object[] compileToClassFiles(String source,
                                          String sourceLocation,
                                          int lineno,
                                          String mainClassName)
      {
          Parser p = new Parser(compilerEnv);
          AstRoot ast = p.parse(source, sourceLocation, lineno);
          IRFactory irf = new IRFactory(compilerEnv);
          ScriptNode tree = irf.transformTree(ast);
  
          // release reference to original parse tree & parser
          irf = null;
          ast = null;
          p = null;
  
          Class<?> superClass = getTargetExtends();
          Class<?>[] interfaces = getTargetImplements();
          String scriptClassName;
          boolean isPrimary = (interfaces == null && superClass == null);
          if (isPrimary) {
              scriptClassName = mainClassName;
          } else {
              scriptClassName = makeAuxiliaryClassName(mainClassName, "1");
          }
  
          Codegen codegen = new Codegen();
          codegen.setMainMethodClass(mainMethodClassName);
          byte[] scriptClassBytes
              = codegen.compileToClassFile(compilerEnv, scriptClassName,
                                           tree, tree.getEncodedSource(),
                                           false);
  
          if (isPrimary) {
              return new Object[] { scriptClassName, scriptClassBytes };
          }
          int functionCount = tree.getFunctionCount();
          ObjToIntMap functionNames = new ObjToIntMap(functionCount);
          for (int i = 0; i != functionCount; ++i) {
              FunctionNode ofn = tree.getFunctionNode(i);
              String name = ofn.getName();
              if (name != null && name.length() != 0) {
                  functionNames.put(name, ofn.getParamCount());
              }
          }
          if (superClass == null) {
              superClass = ScriptRuntime.ObjectClass;
          }
          byte[] mainClassBytes
              = JavaAdapter.createAdapterCode(
                  functionNames, mainClassName,
                  superClass, interfaces, scriptClassName);
  
          return new Object[] { mainClassName, mainClassBytes,
                                scriptClassName, scriptClassBytes };
      }