Class Replacement
java.lang.Object
com.google.errorprone.fixes.Replacement
A replaced section of a source file.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Replacement
Creates aReplacement
.int
The end of the replacement range, exclusive.int
length()
The length of the input text to be replaced.abstract com.google.common.collect.Range
<Integer> range()
TheRange
to be replaced.abstract String
The source text to appear in the output.int
The beginning of the replacement range.
-
Constructor Details
-
Replacement
public Replacement()
-
-
Method Details
-
create
Creates aReplacement
. Start and end positions are represented as code unit indices in a Unicode 16-bit string.- Parameters:
startPosition
- the beginning of the replacementendPosition
- the end of the replacement, exclusivereplaceWith
- the replacement text
-
startPosition
public int startPosition()The beginning of the replacement range. -
length
public int length()The length of the input text to be replaced. -
endPosition
public int endPosition()The end of the replacement range, exclusive. -
range
TheRange
to be replaced. -
replaceWith
The source text to appear in the output.
-