Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

pack-priv final Class When

extends Instruction
Class Inheritance
Imports
com.sun.org.apache.xalan.internal.xsltc.compiler.util.BooleanType, .ClassGenerator, .ErrorMsg, .MethodGenerator, .Type, .TypeCheckError, .Util

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private boolean
private Expression

Constructor Summary

AccessConstructor and Description
pack-priv
When()

Method Summary

Modifier and TypeMethod and Description
public void
display(int
Indentation level for syntax tree levels.
indent
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.display.

Displays the contents of this syntax tree node (to stdout).
public Expression
public boolean
public void
parseContents(Parser
reference to the XSLT parser
parser
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions).
public void
translate(ClassGenerator
BCEL Java class generator
classGen
,
MethodGenerator
BCEL Java method generator
methodGen
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.translate.

This method should never be called.
public Type
typeCheck(SymbolTable
The compiler/parser's symbol table
stable
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.typeCheck.

Type-check this when element.

Field Detail

_ignoreback to summary
private boolean _ignore
_testback to summary
private Expression _test

Constructor Detail

Whenback to summary
pack-priv When()

Method Detail

displayback to summary
public void display(int indent)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.display.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.display.

Displays the contents of this syntax tree node (to stdout). This method is intended for debugging _only_, and should be overridden by all syntax tree node implementations.

Parameters
indent:int

Indentation level for syntax tree levels.

getTestback to summary
public Expression getTest()
ignoreback to summary
public boolean ignore()
parseContentsback to summary
public void parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions). The default behaviour is to parser the syntax tree node's children (since there are no common expressions, patterns, etc. that can be handled in this base class.

Parameters
parser:Parser

reference to the XSLT parser

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.translate.

This method should never be called. An Otherwise object will explicitly translate the "test" expression and and contents of this element.

Parameters
classGen:ClassGenerator

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translate.

BCEL Java class generator

methodGen:MethodGenerator

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.translate.

BCEL Java method generator

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.typeCheck.

Type-check this when element. The test should always be type checked, while we do not bother with the contents if we know the test fails. This is important in cases where the "test" expression tests for the support of a non-available element, and the <xsl:when> body contains this non-available element.

Parameters
stable:SymbolTable

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.typeCheck.

The compiler/parser's symbol table