final int current = methodGen.getLocalIndex("current");
// Push required parameters
il.append(classGen.loadTranslet());
if (classGen.isExternal()) {
il.append(new CHECKCAST(cpg.addClass(className)));
}
il.append(methodGen.loadDOM());
// Create new instance of DOM class (with RTF_INITIAL_SIZE nodes)
il.append(methodGen.loadDOM());
int index = cpg.addInterfaceMethodref(DOM_INTF,
"getResultTreeFrag",
"(IZ)" + DOM_INTF_SIG);
il.append(new PUSH(cpg, RTF_INITIAL_SIZE));
il.append(new PUSH(cpg, false));
il.append(new INVOKEINTERFACE(index,3));
il.append(DUP);
// Store new DOM into a local variable
newDom = methodGen.addLocalVariable("rt_to_reference_dom",
Util.getJCRefType(DOM_INTF_SIG),
null, null);
il.append(new CHECKCAST(cpg.addClass(DOM_INTF_SIG)));
newDom.setStart(il.append(new ASTORE(newDom.getIndex())));
// Overwrite old handler with DOM handler
index = cpg.addInterfaceMethodref(DOM_INTF,
"getOutputDomBuilder",