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

public abstract Class LocationPathPattern

extends Pattern
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xalan.internal.xsltc.compiler.RelativePathPattern, com.sun.org.apache.xalan.internal.xsltc.compiler.AbsolutePathPattern, com.sun.org.apache.xalan.internal.xsltc.compiler.IdKeyPattern
Imports
com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .MethodGenerator, .Type, .TypeCheckError, com.sun.org.apache.xml.internal.dtm.Axis

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private int
private int
private double
private Template

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public double
public abstract StepPattern
public final double
getPriority()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.getPriority.

Returns the priority of this pattern (section 5.5 in the XSLT spec).
public Template
getTemplate()

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

Get the Template node that represents the <xsl:template/> element that this node occured under.
public abstract boolean
public boolean
noSmallerThan(LocationPathPattern other)

This method is used by the Mode class to prioritise patterns and template.

public abstract void
public void
setTemplate(final Template template)

public String
toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.toString.

Returns a string representation of the object.
public void
translate(ClassGenerator
BCEL Java class generator
classGen
,
MethodGenerator
BCEL Java method generator
methodGen
)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.translate.

Translate this node into JVM bytecodes.
public Type
typeCheck(SymbolTable
The compiler/parser's symbol table
stable
)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.typeCheck.

Returns the type of a pattern, which is always a NodeType.

Field Detail

_importPrecedenceback to summary
private int _importPrecedence
_positionback to summary
private int _position
_priorityback to summary
private double _priority
_templateback to summary
private Template _template

Hides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode._template.

Constructor Detail

LocationPathPatternback to summary
public LocationPathPattern()

Method Detail

getAxisback to summary
public int getAxis()
getDefaultPriorityback to summary
public double getDefaultPriority()
getKernelPatternback to summary
public abstract StepPattern getKernelPattern()
getPriorityback to summary
public final double getPriority()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.getPriority.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.getPriority.

Returns the priority of this pattern (section 5.5 in the XSLT spec).

getTemplateback to summary
public Template getTemplate()

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

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

Get the Template node that represents the <xsl:template/> element that this node occured under. Note that this method will return 'null' for nodes that represent top-level elements.

Returns:Template

The Template ancestor node of this node or 'null'.

isWildcardback to summary
public abstract boolean isWildcard()
noSmallerThanback to summary
public boolean noSmallerThan(LocationPathPattern other)

This method is used by the Mode class to prioritise patterns and template. This method is called for templates that are in the same mode and that match on the same core pattern. The rules used are: o) first check precedence - highest precedence wins o) then check priority - highest priority wins o) then check the position - the template that occured last wins

reduceKernelPatternback to summary
public abstract void reduceKernelPattern()
setTemplateback to summary
public void setTemplate(final Template template)
toStringback to summary
public String toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

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

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.translate.

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

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 com.sun.org.apache.xalan.internal.xsltc.compiler.AlternativePattern#translate) then a GOTO must be appended to the instruction list after calling translate.

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

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern.typeCheck.

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

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.

Parameters
stable:SymbolTable

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

The compiler/parser's symbol table