org.apache.xalan.xsltc.compiler

Class Pattern

public abstract class Pattern extends Expression

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
abstract doublegetPriority()
Returns the priority of this pattern (section 5.5 in the XSLT spec).
abstract voidtranslate(ClassGenerator classGen, MethodGenerator methodGen)
Translate this node into JVM bytecodes.
abstract TypetypeCheck(SymbolTable stable)
Returns the type of a pattern, which is always a NodeType.

Method Detail

getPriority

public abstract double getPriority()
Returns the priority of this pattern (section 5.5 in the XSLT spec).

translate

public abstract void translate(ClassGenerator classGen, MethodGenerator methodGen)
Translate this node into JVM bytecodes. Patterns are translated as boolean expressions with true/false lists. Before calling translate on a pattern, make sure that the node being matched is on top of the stack. After calling translate, make sure to backpatch both true and false lists. True lists are the default, in the sense that they always "fall through". If this is not the intended semantics (e.g., see {@link org.apache.xalan.xsltc.compiler.AlternativePattern#translate}) then a GOTO must be appended to the instruction list after calling translate.

typeCheck

public abstract Type typeCheck(SymbolTable stable)
Returns the type of a pattern, which is always a NodeType. A NodeType has a number of subtypes defined by NodeType._type corresponding to each type of node.
Copyright B) 2005 Apache XML Project. All Rights Reserved.