Remove TokenStreamRewriter.getOriginalText() (use rewriter.getSource().getText() instead)

This commit is contained in:
Sam Harwell 2012-04-04 10:15:29 -05:00
parent a85f1c17a1
commit bbd61dca35
2 changed files with 2 additions and 11 deletions

View File

@ -321,15 +321,6 @@ public class TokenStreamRewriter {
return is;
}
public String getOriginalText() {
return tokens.getText();
}
/** The text collected from all tokens in the input token stream */
public String getOriginalText(Interval interval) {
return tokens.getText(interval);
}
/** Return the text from the original tokens altered per the
* instructions given to this rewriter.
*/

View File

@ -163,7 +163,7 @@ public class TestTokenStreamRewriter extends BaseTest {
stream.fill();
// replace 3 * 0 with 0
String result = tokens.getOriginalText();
String result = tokens.getSource().getText();
String expecting = "x = 3 * 0;";
assertEquals(expecting, result);
@ -198,7 +198,7 @@ public class TestTokenStreamRewriter extends BaseTest {
stream.fill();
TokenStreamRewriter tokens = new TokenStreamRewriter(stream);
String result = tokens.getOriginalText();
String result = tokens.getSource().getText();
String expecting = "x = 3 * 0 + 2 * 0;";
assertEquals(expecting, result);