|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.runtime.powerassert.SourceText
public class SourceText
Provides the source text for an assertion statement and translates coordinates in the original source text to coordinates relative to the assertion's (normalized) source text.
| Constructor Summary | |
|---|---|
SourceText(AssertStatement stat,
SourceUnit sourceUnit,
Janitor janitor)
Constructs a SourceText by reading the given assertion's source text from the given source unit. |
|
| Method Summary | |
|---|---|
int |
getNormalizedColumn(int line,
int column)
Returns the column in getNormalizedText() corresponding to the given line and column in the original source text. |
java.lang.String |
getNormalizedText()
Returns the assertion's source text after removing line breaks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceText(AssertStatement stat,
SourceUnit sourceUnit,
Janitor janitor)
stat - an assertion statementsourceUnit - the source unit containing the assertion statementjanitor - a Janitor for cleaning up reader sources| Method Detail |
|---|
public java.lang.String getNormalizedText()
Limitation: Line comments within the assertion's source text are not handled.
public int getNormalizedColumn(int line,
int column)
line - a line numbercolumn - a column number
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||