final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_path != null) {
final int initAI = cpg.addMethodref(ABSOLUTE_ITERATOR,
"<init>",
"("
+ NODE_ITERATOR_SIG
+ ")V");
// Create new AbsoluteIterator
il.append(new NEW(cpg.addClass(ABSOLUTE_ITERATOR)));
il.append(DUP);
// Compile relative path iterator(s)
_path.translate(classGen, methodGen);
// Initialize AbsoluteIterator with iterator from the stack
il.append(new INVOKESPECIAL(initAI));
}
else {
final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
"getIterator",
"()"+NODE_ITERATOR_SIG);
il.append(methodGen.loadDOM());
il.append(new INVOKEINTERFACE(gitr, 1));
}