| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final List | |
| private String | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | SourceText(AssertStatement
an assertion statement stat, SourceUnit the source unit containing the assertion statement sourceUnit, Janitor a Janitor for cleaning up reader sources janitor)Constructs a SourceText by reading the given assertion's source text from the given source unit. |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| public int | Returns: the column in getNormalizedText() corresponding to the given line and column in the original source texta line number line, int a column number column)Returns the column in getNormalizedText() corresponding to the given line and column in the original source text. |
| public String | Returns: the assertion's source text after removing line breaks.Returns the assertion's source text after removing line breaks. |
| private static boolean |
| firstLine | back to summary |
|---|---|
| private final int firstLine | |
| lineOffsets | back to summary |
|---|---|
| private final List<Integer> lineOffsets | |
| normalizedText | back to summary |
|---|---|
| private String normalizedText | |
| textOffsets | back to summary |
|---|---|
| private final List<Integer> textOffsets | |
| SourceText | back to summary |
|---|---|
| public SourceText(AssertStatement stat, SourceUnit sourceUnit, Janitor janitor) Constructs a SourceText by reading the given assertion's source text from the given source unit.
| |
| countLeadingWhitespace | back to summary |
|---|---|
| private static int countLeadingWhitespace(String lineText) | |
| getNormalizedColumn | back to summary |
|---|---|
| public int getNormalizedColumn(int line, int column) Returns the column in getNormalizedText() corresponding to the given line and column in the original source text. The first character in the normalized text has column 1.
| |
| getNormalizedText | back to summary |
|---|---|
| public String getNormalizedText() Returns the assertion's source text after removing line breaks. Limitation: Line comments within the assertion's source text are not handled.
| |
| hasPlausibleSourcePosition | back to summary |
|---|---|
| private static boolean hasPlausibleSourcePosition(ASTNode node) | |