code: public Map < String, String > generate(XmlSchema xmlSchema,
              String targetPackageName) throws Xsd2ConverterException {
          try {
              Map < String, String > code = new HashMap < String, String >();
              for (Entry < String, Xsd2CobolTypesModelBuilder.RootCompositeType > entry : modelBuilder
                      .build(xmlSchema).entrySet()) {
                  String className = JAVA_CLASS_NAME_PREFIX + entry.getKey();
                  Map < String, Object > model = new HashMap < String, Object >();
                  if (targetPackageName != null && targetPackageName.length() > 0) {
                      model.put("target_package_name", targetPackageName);
                  }
                  model.put("class_name", className);
                  model.put("root_type_name", entry.getKey());
                  model.put("root_cobol_name", entry.getValue().cobolName);
                  model.put("complex_types", entry.getValue().complexTypes);
                  model.put("choice_types", entry.getValue().choiceTypes);
                  code.put(className, hbtJavaClass.apply(model));
              }
              return code;
          } catch (IOException e) {
              throw new Xsd2ConverterException(e);
          }
      }
docs: Given a COBOL annotated XML schema, produce a set of java classes (source
  code) used to convert mainframe data at runtime.
  
  @param xmlSchema the COBOL-annotated XML schema (see legstar-cob2xsd)
  @param targetPackageName the java package the generated classes should
  reside in
  @return a map of java class names to their source code
  @throws Xsd2ConverterException if generation fails