code: void generateMultiAdminObjectClassCode(Definition def, String className, int num)
     {
        if (className == null || className.equals(""))
           return;
  
        try
        {
           String clazzName = this.getClass().getPackage().getName() + ".code." + className + "CodeGen";
  
           Class<?> clazz = Class.forName(clazzName, true, Thread.currentThread().getContextClassLoader());
           AbstractCodeGen codeGen = (AbstractCodeGen) clazz.newInstance();
  
           String javaFile = "";
           if (codeGen instanceof AoImplCodeGen)
           {
              ((AoImplCodeGen) codeGen).setNumOfAo(num);
              javaFile = def.getAdminObjects().get(num).getAdminObjectClass() + ".java";
           }
           else if (codeGen instanceof AoInterfaceCodeGen)
           {
              ((AoInterfaceCodeGen) codeGen).setNumOfAo(num);
              javaFile = def.getAdminObjects().get(num).getAdminObjectInterface() + ".java";
           }
  
           FileWriter fw = Utils.createSrcFile(javaFile, def.getRaPackage(), def.getOutputDir());
           codeGen.generate(def, fw);
  
           fw.flush();
           fw.close();
        }
        catch (Exception e)
        {
           e.printStackTrace();
        }
     }
docs: generate multi admin object class code
  
  @param def       Definition
  @param className class name
  @param num       number of order