private void generateClassDefinition(JClassType x, List<JsStatement> globalStmts) {
SourceInfo sourceInfo = x.getSourceInfo();
assert x != program.getTypeJavaLangString();
JLiteral typeId = getRuntimeTypeReference(x);
JClassType superClass = x.getSuperClass();
JLiteral superTypeId = (superClass == null) ? JNullLiteral.INSTANCE :
getRuntimeTypeReference(x.getSuperClass());
// check if there's an overriding prototype
JInterfaceType jsPrototypeIntf = JProgram.maybeGetJsTypeFromPrototype(superClass);
String jsPrototype = jsPrototypeIntf != null ? jsPrototypeIntf.getJsPrototype() : null;