wrapperDefParms.addAll(methodDefParms);
if (useJSNIStubs) {
classBuilder.publicMethod(m.getReturnType(), getPrivateMethodName(m))
.parameters(new DefParameters(wrapperDefParms))
.modifiers(Modifier.Static, Modifier.JSNI)
.body()
.append(new StringStatement(JSNIUtil.methodAccess(m)))
.finish();
}
else {
String cachedMethod = initCachedMethod(classBuilder, m);
Object[] args = new Object[methodDefParms.size()];
int i = 0;
for (Parameter p : methodDefParms) {
args[i++] = Refs.get(p.getName());
}
BlockBuilder<? extends ClassStructureBuilder> body = classBuilder.publicMethod(m.getReturnType(),
getPrivateMethodName(m))
.parameters(new DefParameters(wrapperDefParms))
.modifiers(Modifier.Static)
.body();
BlockBuilder<CatchBlockBuilder> tryBuilder = Stmt.try_();