final int reset = cpg.addInterfaceMethodref(NODE_ITERATOR, "reset", "()"+NODE_ITERATOR_SIG); il.append(new INVOKEINTERFACE(reset,1));
final int clone = cpg.addInterfaceMethodref(NODE_ITERATOR, "cloneIterator", "()" + NODE_ITERATOR_SIG); il.append(new INVOKEINTERFACE(clone, 1));
    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {	final ConstantPoolGen cpg = classGen.getConstantPool();	final InstructionList il = methodGen.getInstructionList();	// Fall-through for variables that are implemented as methods	if (_type.implementedAsMethod()) return;	final String name = _variable.getVariable();	if (_variable.isLocal()) {	    if (classGen.isExternal() || _escaped) {		il.append(classGen.loadTranslet());		final int sindex = ((Variable)_variable).getStackIndex();		il.append(new PUSH(cpg, sindex));		final int getVar = cpg.addMethodref(TRANSLET_CLASS, 						    GET_VARIABLE,						    GET_VARIABLE_SIG);		il.append(new INVOKEVIRTUAL(getVar));		_type.translateUnBox(classGen, methodGen);	    }	    else {		il.append(_variable.loadInstruction());		_variable.removeReference(this);	    }	}	else {	    final String signature = _type.toSignature();	    final String className = classGen.getClassName();	    il.append(classGen.loadTranslet());	    // If inside a predicate we must cast this ref down	    if (classGen.isExternal()) {		il.append(new CHECKCAST(cpg.addClass(className)));	    }	    il.append(new GETFIELD(cpg.addFieldref(className,name,signature)));	}	if (_variable.getType() instanceof NodeSetType) {	    final int reset = cpg.addInterfaceMethodref(NODE_ITERATOR,							"reset",							"()"+NODE_ITERATOR_SIG);	    il.append(new INVOKEINTERFACE(reset,1));	    	}    }