|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.ipd.sdq.ByCounter.parsing.LineNumberRange
public final class LineNumberRange
Denotes a range of source code line numbers which should be measured with BytecodeCounter
.
Source code line numbers may have another order in the source code file than in the compiled Bytecode.
If there is more than one Bytecode block containing referencing a source code line, all blocks
containing a reference will be counted. In general, LineNumberRangefrom x to y means that all
Bytecode blocks B are counted for which { B | x <= ReferencedLineNumber(B) <= y } holds.
Additionally, all blocks B_{hull} = {B_h | NoReferencedLineNumber(B_h) and \exists B_j \in B: JumpFromTo(B_j,B_h)}
are counted which do not reference a line number but for which a jump from any of the blocks in B exist. This enables
correct counting of for-each-loops.
Field Summary | |
---|---|
int |
firstLine
The first line number included in the range. |
int |
lastLine
The last line number included in the range. |
Constructor Summary | |
---|---|
LineNumberRange(int firstLine,
int lastLine)
A new line number range with the given parameters. |
Method Summary | |
---|---|
int |
compareTo(LineNumberRange o)
|
static LineNumberRange |
findLineInRanges(LineNumberRange[] codeAreasToInstrument,
int l)
Searches an array for a LineNumberRange starting at a given line. |
static java.util.Comparator<? super LineNumberRange> |
getComparator()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int firstLine
public int lastLine
Constructor Detail |
---|
public LineNumberRange(int firstLine, int lastLine)
firstLine
- The first included source code line number.lastLine
- The last included source code line number.Method Detail |
---|
public static java.util.Comparator<? super LineNumberRange> getComparator()
LineNumberRange
s.
The comparison is based on the first line only. E.g.: A range r1 is
smaller than r2 if r1.firstLine is smaller than r2.firstLine.public static LineNumberRange findLineInRanges(LineNumberRange[] codeAreasToInstrument, int l)
LineNumberRange
starting at a given line.
codeAreasToInstrument
- List of LineNumberRange
s to search.l
- Line to analyse.
public int compareTo(LineNumberRange o)
compareTo
in interface java.lang.Comparable<LineNumberRange>
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |