Class LocationPathPattern

  • All Implemented Interfaces:
    org.apache.bcel.generic.InstructionConstants, Constants

    public abstract class LocationPathPattern
    extends Pattern
    Author:
    Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen
    • Constructor Detail

      • LocationPathPattern

        public LocationPathPattern()
    • Method Detail

      • typeCheck

        public Type typeCheck​(org.apache.xalan.xsltc.compiler.SymbolTable stable)
                       throws TypeCheckError
        Description copied from class: Pattern
        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.
        Specified by:
        typeCheck in class Pattern
        Parameters:
        stable - The compiler/parser's symbol table
        Throws:
        TypeCheckError
      • setTemplate

        public void setTemplate​(Template template)
      • getTemplate

        public Template getTemplate()
      • getPriority

        public final double getPriority()
        Description copied from class: Pattern
        Returns the priority of this pattern (section 5.5 in the XSLT spec).
        Specified by:
        getPriority in class Pattern
      • getDefaultPriority

        public double getDefaultPriority()
      • noSmallerThan

        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
      • getKernelPattern

        public abstract org.apache.xalan.xsltc.compiler.StepPattern getKernelPattern()
      • reduceKernelPattern

        public abstract void reduceKernelPattern()
      • isWildcard

        public abstract boolean isWildcard()
      • getAxis

        public int getAxis()
      • toString

        public java.lang.String toString()
      • getType

        public Type getType()
      • hasPositionCall

        public boolean hasPositionCall()
      • hasLastCall

        public boolean hasLastCall()
      • evaluateAtCompileTime

        public java.lang.Object evaluateAtCompileTime()
        Returns an object representing the compile-time evaluation of an expression. We are only using this for function-available and element-available at this time.
      • compile

        public final org.apache.bcel.generic.InstructionList compile​(ClassGenerator classGen,
                                                                     MethodGenerator methodGen)
        Translate this node into a fresh instruction list. The original instruction list is saved and restored.
      • translateDesynthesized

        public void translateDesynthesized​(ClassGenerator classGen,
                                           MethodGenerator methodGen)
        Redefined by expressions of type boolean that use flow lists.
      • startIterator

        public void startIterator​(ClassGenerator classGen,
                                  MethodGenerator methodGen)
        If this expression is of type node-set and it is not a variable reference, then call setStartNode() passing the context node.
      • synthesize

        public void synthesize​(ClassGenerator classGen,
                               MethodGenerator methodGen)
        Synthesize a boolean expression, i.e., either push a 0 or 1 onto the operand stack for the next statement to succeed. Returns the handle of the instruction to be backpatched.
      • getFalseList

        public FlowList getFalseList()
      • getTrueList

        public FlowList getTrueList()
      • backPatchFalseList

        public void backPatchFalseList​(org.apache.bcel.generic.InstructionHandle ih)
      • backPatchTrueList

        public void backPatchTrueList​(org.apache.bcel.generic.InstructionHandle ih)
      • lookupPrimop

        public MethodType lookupPrimop​(org.apache.xalan.xsltc.compiler.SymbolTable stable,
                                       java.lang.String op,
                                       MethodType ctype)
        Search for a primop in the symbol table that matches the method type ctype. Two methods match if they have the same arity. If a primop is overloaded then the "closest match" is returned. The first entry in the vector of primops that has the right arity is considered to be the default one.