Class CodeReplacement
- java.lang.Object
-
- com.google.javascript.refactoring.CodeReplacement
-
- All Implemented Interfaces:
java.lang.Comparable<CodeReplacement>
@Immutable public abstract class CodeReplacement extends java.lang.Object implements java.lang.Comparable<CodeReplacement>
Class that represents a set of changes to make to the code.
-
-
Constructor Summary
Constructors Constructor Description CodeReplacement()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(CodeReplacement x)
int
getEndPosition()
Returns the end position within the file that the modification should be applied starting at.abstract int
getLength()
Returns how many characters the new content should replace in the original content.abstract java.lang.String
getNewContent()
Returns the new content that should be inserted into the file.abstract int
getStartPosition()
Returns the start position within the file that the modification should be applied starting at.
-
-
-
Method Detail
-
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
public abstract java.lang.String getNewContent()
Returns the new content that should be inserted into the file.
-
compareTo
public final int compareTo(CodeReplacement x)
- Specified by:
compareTo
in interfacejava.lang.Comparable<CodeReplacement>
-
-