Class SuggestedFixData.Replacement
java.lang.Object
org.checkerframework.framework.source.SuggestedFixData.Replacement
- Enclosing class:
SuggestedFixData
A single text replacement: replace the source between two offsets with new text.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intEnd source offset, exclusive.final intStart source offset, inclusive.final StringThe replacement text (empty string to delete the range). -
Constructor Summary
ConstructorsConstructorDescriptionReplacement(int startPosition, int endPosition, String text) Creates a replacement. -
Method Summary
-
Field Details
-
startPosition
public final int startPositionStart source offset, inclusive. -
endPosition
public final int endPositionEnd source offset, exclusive. -
text
The replacement text (empty string to delete the range).
-
-
Constructor Details
-
Replacement
Creates a replacement.- Parameters:
startPosition- start source offset, inclusive; must be non-negativeendPosition- end source offset, exclusive; must be at leaststartPosition(equal for a pure insertion)text- the replacement text (empty to delete)- Throws:
IllegalArgumentException- ifstartPositionis negative orendPositionis less thanstartPosition
-