FileDocCategorySizeDatePackage
LocalNameCall.javaAPI DocJava SE 5 API2415Fri Aug 26 14:55:36 BST 2005com.sun.org.apache.xalan.internal.xsltc.compiler

LocalNameCall

public final class LocalNameCall extends NameBase
author
Morten Jorgensen

Fields Summary
Constructors Summary
public LocalNameCall(QName fname)
Handles calls with no parameter (current node is implicit parameter).

	super(fname);
    
public LocalNameCall(QName fname, Vector arguments)
Handles calls with one parameter (either node or node-set).

	super(fname, arguments);
    
Methods Summary
public voidtranslate(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen)
This method is called when the constructor is compiled in Stylesheet.compileConstructor() and not as the syntax tree is traversed.

	final ConstantPoolGen cpg = classGen.getConstantPool();
	final InstructionList il = methodGen.getInstructionList();

	// Returns the name of a node in the DOM
	final int getNodeName = cpg.addInterfaceMethodref(DOM_INTF,
							  "getNodeName",
							  "(I)"+STRING_SIG);

	final int getLocalName = cpg.addMethodref(BASIS_LIBRARY_CLASS,
						  "getLocalName",
						  "(Ljava/lang/String;)"+
						  "Ljava/lang/String;");
	super.translate(classGen, methodGen);
	il.append(new INVOKEINTERFACE(getNodeName, 2));
	il.append(new INVOKESTATIC(getLocalName));