private String transform(Source source,TranslationInfo translations,String packageName,String className,String locale){
  String lineSep=System.getProperty("line.separator");
  String bundleName=I18nUtils.bundleNameFromClassName(className);
  String[] codePieces={codegenImports(translations.getClassReferences()),"[ExcludeClass]",lineSep,lineSep,"public class ",className," extends ResourceBundle",lineSep,"{",lineSep,codegenAtEmbeds(translations.getEmeds()),"    public function ",className,"()",lineSep,"    {",lineSep,codegenSuper(locale,bundleName),lineSep,"    }",lineSep,lineSep,"    override protected function getContent():Object",lineSep,"    {",lineSep,"        var content:Object =",lineSep,"        {",lineSep,codegenContent(translations.getTranslationSet()),"        };",lineSep,"        return content;",lineSep,"    }",lineSep,"}",lineSep,lineSep};
  return StringJoiner.join(codePieces,null);
}

private String transform ( Source source , TranslationInfo translations , String packageName , String className , String locale ) { String lineSep = System . getProperty ( "line.separator" ) ; String bundleName = I18nUtils . bundleNameFromClassName ( className ) ; String [ ] codePieces = { codegenImports ( translations . getClassReferences ( ) ) , "[ExcludeClass]" , lineSep , lineSep , "public class " , className , " extends ResourceBundle" , lineSep , "{" , lineSep , codegenAtEmbeds ( translations . getEmeds ( ) ) , "    public function " , className , "()" , lineSep , "    {" , lineSep , codegenSuper ( locale , bundleName ) , lineSep , "    }" , lineSep , lineSep , "    override protected function getContent():Object" , lineSep , "    {" , lineSep , "        var content:Object =" , lineSep , "        {" , lineSep , codegenContent ( translations . getTranslationSet ( ) ) , "        };" , lineSep , "        return content;" , lineSep , "    }" , lineSep , "}" , lineSep , lineSep } ; return StringJoiner . join ( codePieces , null ) ; }
transforms foo . properties into a source text file with the following autogenerated code for a resource bundle class : package { import mx . resources . resourcebundle ; [ excludeclass ] public class foo_properties extends resourcebundle { public function foo_properties ( ) { super ( " en_us " , " foo " ) ; } override protected function getcontent ( ) : object { var content : object = { " key1 " : " value1 " , " key2 " : " value2 " } ; return content ; } } }
