Class CodeReplacement
java.lang.Object
com.google.javascript.refactoring.CodeReplacement
- All Implemented Interfaces:
Comparable<CodeReplacement>
@Immutable
public abstract class CodeReplacement
extends Object
implements Comparable<CodeReplacement>
Class that represents a set of changes to make to the code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intintReturns the end position within the file that the modification should be applied starting at.abstract intReturns how many characters the new content should replace in the original content.abstract StringReturns the new content that should be inserted into the file.abstract intReturns the start position within the file that the modification should be applied starting at.
-
Constructor Details
-
CodeReplacement
public CodeReplacement()
-
-
Method Details
-
getStartPosition
public abstract int getStartPosition()Returns the start position within the file that the modification should be applied starting at. -
getLength
public abstract int getLength()Returns how many characters the new content should replace in the original content. -
getEndPosition
public int getEndPosition()Returns the end position within the file that the modification should be applied starting at. -
getNewContent
Returns the new content that should be inserted into the file. -
compareTo
- Specified by:
compareToin interfaceComparable<CodeReplacement>
-