| Modifier and Type | Field and Description |
|---|---|
| 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 List | _patterns
ArrayList of all patterns in the test sequence. |
| private InstructionHandle | _start
Cached handle to avoid compiling more than once. |
| Access | Constructor and Description |
|---|---|
| public | TestSeq(List<LocationPathPattern> patterns, Mode mode)
Creates a new test sequence given a set of patterns and a mode. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public InstructionHandle | compile(ClassGenerator classGen, MethodGenerator methodGen, InstructionHandle continuation)
Compile the code for this test sequence. |
| public void | findTemplates(Map<Template, Object> templates)
Returns, by reference, the templates that are included in this test sequence. |
| public InstructionList | |
| private LocationPathPattern | |
| public int | |
| public double | |
| private InstructionHandle | |
| public void | |
| public String | toString()
Overrides java. Returns a string representation of this test sequence. |
| _default | back to summary |
|---|---|
| private Template _default Default template for this test sequence | |
| _instructionList | back to summary |
|---|---|
| private InstructionList _instructionList Instruction list representing this test sequence. | |
| _kernelType | back to summary |
|---|---|
| private int _kernelType Integer code for the kernel type of this test sequence | |
| _mode | back to summary |
|---|---|
| private Mode _mode A reference to the Mode object. | |
| _patterns | back to summary |
|---|---|
| private List<LocationPathPattern> _patterns ArrayList of all patterns in the test sequence. May include patterns with "*", "@*" or "node()" kernel. | |
| _start | back to summary |
|---|---|
| private InstructionHandle _start Cached handle to avoid compiling more than once. | |
| TestSeq | back to summary |
|---|---|
| public TestSeq(List<LocationPathPattern> patterns, Mode mode) Creates a new test sequence given a set of patterns and a mode. | |
| TestSeq | back to summary |
|---|---|
| public TestSeq(List<LocationPathPattern> patterns, int kernelType, Mode mode) | |
| compile | back to summary |
|---|---|
| public InstructionHandle compile(ClassGenerator classGen, MethodGenerator methodGen, InstructionHandle continuation) Compile the code for this test sequence. Compile patterns from highest to lowest priority. Note that since patterns can be share by multiple test sequences, instruction lists must be copied before backpatching. | |
| findTemplates | back to summary |
|---|---|
| public void findTemplates(Map<Template, Object> templates) Returns, by reference, the templates that are included in this test sequence. Note that a single template can occur in several test sequences if its pattern is a union. | |
| getInstructionList | back to summary |
|---|---|
| public InstructionList getInstructionList() Returns the instruction list for this test sequence | |
| getPattern | back to summary |
|---|---|
| private LocationPathPattern getPattern(int n) Returns pattern n in this test sequence | |
| getPosition | back to summary |
|---|---|
| public int getPosition() Returns the position of the highest priority pattern in this test sequence. | |
| getPriority | back to summary |
|---|---|
| public double getPriority() Return the highest priority for a pattern in this test sequence. This is either the priority of the first or of the default pattern. | |
| getTemplateHandle | back to summary |
|---|---|
| private InstructionHandle getTemplateHandle(Template template) Get the instruction handle to a template's code. This is used when a single template occurs in several test sequences; that is, if its pattern is a union of patterns (e.g. match="A/B | A/C"). | |
| reduce | back to summary |
|---|---|
| public void reduce() Reduce the patterns in this test sequence. Creates a new vector of patterns and sets the default pattern if it finds a patterns that is fully reduced. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this test sequence. Notice that test sequences are mutable, so the value returned by this method is different before and after calling reduce(). | |