org.apache.xalan.xsltc.compiler

Class SyntaxTreeNode

public abstract class SyntaxTreeNode extends Object implements Constants

Author: Jacek Ambroziak Santiago Pericas-Geertsen G. Todd Miller Morten Jorensen Erwin Bolwidt John Howard

Constructor Summary
SyntaxTreeNode()
Creates a new SyntaxTreeNode with a 'null' QName and no source file line number reference.
SyntaxTreeNode(int line)
Creates a new SyntaxTreeNode with a 'null' QName.
SyntaxTreeNode(String uri, String prefix, String local)
Creates a new SyntaxTreeNode with no source file line number reference.
Method Summary
voiddisplay(int indent)
Displays the contents of this syntax tree node (to stdout).
intgetLineNumber()
Get the source file line number for this element.
ParsergetParser()
Returns this node's XSLT parser.
StylesheetgetStylesheet()
Get the Stylesheet node that represents the element that this node occured under.
voidparseContents(Parser parser)
Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions).
abstract voidtranslate(ClassGenerator classGen, MethodGenerator methodGen)
Translate this abstract syntax tree node into JVM bytecodes.
abstract TypetypeCheck(SymbolTable stable)
Type check the children of this node.

Constructor Detail

SyntaxTreeNode

public SyntaxTreeNode()
Creates a new SyntaxTreeNode with a 'null' QName and no source file line number reference.

SyntaxTreeNode

public SyntaxTreeNode(int line)
Creates a new SyntaxTreeNode with a 'null' QName.

Parameters: line Source file line number reference

SyntaxTreeNode

public SyntaxTreeNode(String uri, String prefix, String local)
Creates a new SyntaxTreeNode with no source file line number reference.

Parameters: uri The element's namespace URI prefix The element's namespace prefix local The element's local name

Method Detail

display

public void display(int indent)
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 Indentation level for syntax tree levels.

getLineNumber

public final int getLineNumber()
Get the source file line number for this element. If unavailable, lookup in ancestors.

Returns: The source file line number.

getParser

public final Parser getParser()
Returns this node's XSLT parser.

Returns: The XSLT parser.

getStylesheet

public Stylesheet getStylesheet()
Get the Stylesheet node that represents the element that this node occured under.

Returns: The Stylesheet ancestor node of this node.

parseContents

public void parseContents(Parser parser)
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 reference to the XSLT parser

translate

public abstract void translate(ClassGenerator classGen, MethodGenerator methodGen)
Translate this abstract syntax tree node into JVM bytecodes.

Parameters: classGen BCEL Java class generator methodGen BCEL Java method generator

typeCheck

public abstract Type typeCheck(SymbolTable stable)
Type check the children of this node. The type check phase may add coercions (CastExpr) to the AST.

Parameters: stable The compiler/parser's symbol table

Copyright © 2005 Apache XML Project. All Rights Reserved.