## org.apache.xalan.xsltc.compiler
Class Pattern

    java.lang.Object
      |
      +--org.apache.xalan.xsltc.compiler.SyntaxTreeNode
            |
            +--org.apache.xalan.xsltc.compiler.Expression
                  |
                  +--org.apache.xalan.xsltc.compiler.Pattern

Direct Known Subclasses:
  LocationPathPattern

public abstract class Pattern
extends org.apache.xalan.xsltc.compiler.Expression

Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode
`UNKNOWN_STYLESHEET_NODE_ID`

Constructor Summary
`Pattern()`

Method Summary
`abstract double` `getPriority()` Returns the priority of this pattern (section 5.5 in the XSLT spec).
`abstract void` `translate(ClassGenerator classGen, MethodGenerator methodGen)` Translate this node into JVM bytecodes.
`abstract Type` `typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable)` Returns the type of a pattern, which is always a `NodeType`.

Methods inherited from class org.apache.xalan.xsltc.compiler.Expression
`backPatchFalseList, backPatchTrueList, compile, desynthesize, evaluateAtCompileTime, getFalseList, getTrueList, getType, hasLastCall, hasPositionCall, lookupPrimop, startIterator, synthesize, toString, translateDesynthesized`

Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode
`display, getLineNumber, getParser, getStylesheet, parseContents`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Pattern

    public Pattern()

Method Detail

### typeCheck

    public abstract Type typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable)
                            throws TypeCheckError

  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.
  Overrides:
    typeCheck in class org.apache.xalan.xsltc.compiler.Expression

### 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 `org.apache.xalan.xsltc.compiler.AlternativePattern#translate`) then a GOTO must be appended to the instruction list after calling `translate`.
  Overrides:
    translate in class org.apache.xalan.xsltc.compiler.Expression

### getPriority

    public abstract double getPriority()

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

Copyright © 2006 Apache XML Project. All Rights Reserved.