private String toRefSect2(String scriptName,SubCommand subCommand){
  Map<String,Object> map=new HashMap<>();
  map.put("id",scriptName + "-" + subCommand.getName());
  final String name=scriptName + " " + subCommand.getName();
  map.put("name",name);
  map.put("description",eolToNewPara(subCommand.getDescription()));
  map.put("optionsTitle",REF_TITLE_OPTIONS.get());
  map.put("optionsIntro",REF_INTRO_OPTIONS.get(name));
  map.put("info",subCommand.getDocDescriptionSupplement());
  setSubCommandOptionsInfo(map,subCommand);
  StringBuilder sb=new StringBuilder();
  applyTemplate(sb,"refSect2.ftl",map);
  return sb.toString();
}

private String toRefSect2 ( String scriptName , SubCommand subCommand ) { Map < String , Object > map = new HashMap < > ( ) ; map . put ( "id" , scriptName + "-" + subCommand . getName ( ) ) ; final String name = scriptName + " " + subCommand . getName ( ) ; map . put ( "name" , name ) ; map . put ( "description" , eolToNewPara ( subCommand . getDescription ( ) ) ) ; map . put ( "optionsTitle" , REF_TITLE_OPTIONS . get ( ) ) ; map . put ( "optionsIntro" , REF_INTRO_OPTIONS . get ( name ) ) ; map . put ( "info" , subCommand . getDocDescriptionSupplement ( ) ) ; setSubCommandOptionsInfo ( map , subCommand ) ; StringBuilder sb = new StringBuilder ( ) ; applyTemplate ( sb , "refSect2.ftl" , map ) ; return sb . toString ( ) ; }
returns a generated docbook xml refsect2 element for a single subcommand to the stringbuilder .
