FileDocCategorySizeDatePackage
BooleanExpr.javaAPI DocJava SE 6 API2431Tue Jun 10 00:22:28 BST 2008com.sun.org.apache.xalan.internal.xsltc.compiler

BooleanExpr

public final class BooleanExpr extends Expression
This class implements inlined calls to the XSLT standard functions true() and false().
author
Jacek Ambroziak
author
Santiago Pericas-Geertsen

Fields Summary
private boolean
_value
Constructors Summary
public BooleanExpr(boolean value)

	_value = value;
    
Methods Summary
public booleancontextDependent()

	return false;
    
public booleangetValue()

	return _value;
    
public java.lang.StringtoString()

	return _value ? "true()" : "false()";
    
public voidtranslate(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen)

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

	final InstructionList il = methodGen.getInstructionList();
	if (_value) {
	    il.append(NOP);	// true list falls through
	}
	else {
	    _falseList.add(il.append(new GOTO(null)));
	}
    
public com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypetypeCheck(com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable stable)

	_type = Type.Boolean;
	return _type;