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

LocationPathPattern

public abstract class LocationPathPattern extends Pattern
author
Jacek Ambroziak
author
Santiago Pericas-Geertsen
author
Morten Jorgensen

Fields Summary
private Template
_template
private int
_importPrecedence
private double
_priority
private int
_position
Constructors Summary
Methods Summary
public intgetAxis()

	final StepPattern sp = getKernelPattern();
	return (sp != null) ? sp.getAxis() : Axis.CHILD;
    
public doublegetDefaultPriority()

	return 0.5;
    
public abstract com.sun.org.apache.xalan.internal.xsltc.compiler.StepPatterngetKernelPattern()

public final doublegetPriority()

	return Double.isNaN(_priority) ? getDefaultPriority() : _priority;
    
public com.sun.org.apache.xalan.internal.xsltc.compiler.TemplategetTemplate()

	return _template;
    
public abstract booleanisWildcard()

public booleannoSmallerThan(com.sun.org.apache.xalan.internal.xsltc.compiler.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

	if (_importPrecedence > other._importPrecedence) {
	    return true;
	}
	else if (_importPrecedence == other._importPrecedence) {
	    if (_priority > other._priority) {
		return true;
	    }
	    else if (_priority == other._priority) {
		if (_position > other._position) {
		    return true;
		}
	    }
	}
	return false;
    
public abstract voidreduceKernelPattern()

public voidsetTemplate(com.sun.org.apache.xalan.internal.xsltc.compiler.Template template)

	_template = template;
	_priority = template.getPriority();
	_importPrecedence = template.getImportPrecedence();
	_position = template.getPosition();
    
public java.lang.StringtoString()

	return "root()";
    
public voidtranslate(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen)

	// TODO: What does it mean to translate a Pattern ?
    
public com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypetypeCheck(com.sun.org.apache.xalan.internal.xsltc.compiler.SymbolTable stable)


          
	return Type.Void;		// TODO