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.INVOKEINTERFACE; 26 import org.apache.bcel.generic.INVOKESTATIC; 27 import org.apache.bcel.generic.InstructionList; 28 import org.apache.xalan.xsltc.compiler.util.ClassGenerator; 29 import org.apache.xalan.xsltc.compiler.util.MethodGenerator; 30 31 34 final class LocalNameCall extends NameBase { 35 36 39 public LocalNameCall(QName fname) { 40 super(fname); 41 } 42 43 46 public LocalNameCall(QName fname, Vector arguments) { 47 super(fname, arguments); 48 } 49 50 54 public void translate(ClassGenerator classGen, 55 MethodGenerator methodGen) { 56 final ConstantPoolGen cpg = classGen.getConstantPool(); 57 final InstructionList il = methodGen.getInstructionList(); 58 59 final int getNodeName = cpg.addInterfaceMethodref(DOM_INTF, 61 "getNodeName", 62 "(I)"+STRING_SIG); 63 64 final int getLocalName = cpg.addMethodref(BASIS_LIBRARY_CLASS, 65 "getLocalName", 66 "(Ljava/lang/String;)"+ 67 "Ljava/lang/String;"); 68 super.translate(classGen, methodGen); 69 il.append(new INVOKEINTERFACE(getNodeName, 2)); 70 il.append(new INVOKESTATIC(getLocalName)); 71 } 72 } 73 | Popular Tags |