// JDT compilation of package-info.java files.
JsProgram jsProgram = new JsProgram();
JsScope scope = jsProgram.getScope();
// Function declaration statement.
JsName name = scope.declareName("package-info", "package-info");
List<JsStatement> statements = jsProgram.getFragment(0).getGlobalBlock().getStatements();
final SourceOrigin sourceInfo = SourceOrigin.UNKNOWN;
JsFunction function = new JsFunction(sourceInfo, scope, name);
function.setBody(new JsBlock(sourceInfo));
statements.add(new JsExprStmt(sourceInfo, function));