|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.compiler.TestSeq
final class TestSeq
A test sequence is a sequence of patterns that (1) occured in templates in the same mode (2) share the same kernel node type (e.g. A/B and C/C/B) (3) may also contain patterns matching "*" and "node()" (element sequence only) or matching "@*" (attribute sequence only). A test sequence may have a default template, which will be instantiated if none of the other patterns match.
Field Summary | |
---|---|
private Template |
_default
Default template for this test sequence |
private InstructionList |
_instructionList
Instruction list representing this test sequence. |
private int |
_kernelType
Integer code for the kernel type of this test sequence |
private Mode |
_mode
A reference to the Mode object. |
private java.util.Vector |
_patterns
Vector of all patterns in the test sequence. |
private InstructionHandle |
_start
Cached handle to avoid compiling more than once. |
Constructor Summary | |
---|---|
TestSeq(java.util.Vector patterns,
int kernelType,
Mode mode)
|
|
TestSeq(java.util.Vector patterns,
Mode mode)
Creates a new test sequence given a set of patterns and a mode. |
Method Summary | |
---|---|
InstructionHandle |
compile(ClassGenerator classGen,
MethodGenerator methodGen,
InstructionHandle continuation)
Compile the code for this test sequence. |
void |
findTemplates(java.util.Dictionary templates)
Returns, by reference, the templates that are included in this test sequence. |
InstructionList |
getInstructionList()
Returns the instruction list for this test sequence |
private LocationPathPattern |
getPattern(int n)
Returns pattern n in this test sequence |
int |
getPosition()
Returns the position of the highest priority pattern in this test sequence. |
double |
getPriority()
Return the highest priority for a pattern in this test sequence. |
private InstructionHandle |
getTemplateHandle(Template template)
Get the instruction handle to a template's code. |
void |
reduce()
Reduce the patterns in this test sequence. |
java.lang.String |
toString()
Returns a string representation of this test sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int _kernelType
private java.util.Vector _patterns
private Mode _mode
private Template _default
private InstructionList _instructionList
private InstructionHandle _start
Constructor Detail |
---|
public TestSeq(java.util.Vector patterns, Mode mode)
public TestSeq(java.util.Vector patterns, int kernelType, Mode mode)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public InstructionList getInstructionList()
public double getPriority()
public int getPosition()
public void reduce()
public void findTemplates(java.util.Dictionary templates)
private InstructionHandle getTemplateHandle(Template template)
private LocationPathPattern getPattern(int n)
public InstructionHandle compile(ClassGenerator classGen, MethodGenerator methodGen, InstructionHandle continuation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |