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

LiteralExpr

public final class LiteralExpr extends Expression
author
Jacek Ambroziak
author
Santiago Pericas-Geertsen

Fields Summary
private final String
_value
private final String
_namespace
Constructors Summary
public LiteralExpr(String value)
Creates a new literal expression node.

param
value the literal expression content/value.

	_value = value;
	_namespace = null;
    
public LiteralExpr(String value, String namespace)
Creates a new literal expression node.

param
value the literal expression content/value.
param
namespace the namespace in which the expression exists.

	_value = value;
	_namespace = namespace.equals(Constants.EMPTYSTRING) ? null : namespace;
    
Methods Summary
protected booleancontextDependent()

	return false;
    
protected java.lang.StringgetNamespace()

	return _namespace;
    
protected java.lang.StringgetValue()

	return _value;
    
public java.lang.StringtoString()

	return "literal-expr(" + _value + ')";
    
public voidtranslate(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen)

	final ConstantPoolGen cpg = classGen.getConstantPool();
	final InstructionList il = methodGen.getInstructionList();
	il.append(new PUSH(cpg, _value));
    
public com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypetypeCheck(com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable stable)

	return _type = Type.String;