Class Replacement

java.lang.Object
com.google.errorprone.fixes.Replacement

public abstract class Replacement extends Object
A replaced section of a source file.
  • Constructor Details

    • Replacement

      public Replacement()
  • Method Details

    • create

      public static Replacement create(int startPosition, int endPosition, String replaceWith)
      Creates a Replacement. Start and end positions are represented as code unit indices in a Unicode 16-bit string.
      Parameters:
      startPosition - the beginning of the replacement
      endPosition - the end of the replacement, exclusive
      replaceWith - 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

      public abstract com.google.common.collect.Range<Integer> range()
      The Range to be replaced.
    • replaceWith

      public abstract String replaceWith()
      The source text to appear in the output.