1 16 19 20 package com.sun.org.apache.xalan.internal.xsltc.compiler; 21 22 import java.util.Vector ; 23 24 import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; 25 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE; 26 import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; 27 import com.sun.org.apache.bcel.internal.generic.InstructionList; 28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; 29 import com.sun.org.apache.xalan.internal.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 |