add class definition to JavaScriptSourceGenerator