JsniMethodBody newBody = new JsniMethodBody(jsniMethodBody.getSourceInfo(), jsniMethodBody.getFunc(),
Lists.newArrayList(newClassRefs), jsniMethodBody.getJsniFieldRefs(),
jsniMethodBody.getJsniMethodRefs(), jsniMethodBody.getUsedStrings());
// Add getClassLiteralForArray as a JsniMethodRef.
newBody.addJsniRef(
new JsniMethodRef(jsniMethodBody.getSourceInfo(), getClassLiteralForArrayMethodIdent,
getClassLiteralForArrayMethod, program.getJavaScriptObject()));
ctx.replaceMe(newBody);
}