Class 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.
      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<Integer> range()
      The Range to be replaced.
    • replaceWith

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