1 16 19 20 package org.apache.xalan.xsltc.compiler; 21 22 import java.util.Vector ; 23 24 import org.apache.bcel.generic.ConstantPoolGen; 25 import org.apache.bcel.generic.INVOKESTATIC; 26 import org.apache.bcel.generic.InstructionList; 27 import org.apache.xalan.xsltc.compiler.util.ClassGenerator; 28 import org.apache.xalan.xsltc.compiler.util.MethodGenerator; 29 30 34 final class GenerateIdCall extends FunctionCall { 35 public GenerateIdCall(QName fname, Vector arguments) { 36 super(fname, arguments); 37 } 38 39 public void translate(ClassGenerator classGen, MethodGenerator methodGen) { 40 final InstructionList il = methodGen.getInstructionList(); 41 if (argumentCount() == 0) { 42 il.append(methodGen.loadContextNode()); 43 } 44 else { argument().translate(classGen, methodGen); 46 } 47 final ConstantPoolGen cpg = classGen.getConstantPool(); 48 il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS, 49 "generate_idF", 50 GET_NODE_NAME_SIG))); 52 } 53 } 54 | Popular Tags |