Class AdjustedPosition

java.lang.Object
com.google.errorprone.fixes.AdjustedPosition
All Implemented Interfaces:
com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition

public class AdjustedPosition extends Object implements com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
Describes a tree position with adjustments to the start and end indices.
  • Field Details

    • position

      protected final com.sun.tools.javac.tree.JCTree position
    • startPositionAdjustment

      protected final int startPositionAdjustment
    • endPositionAdjustment

      protected final int endPositionAdjustment
  • Constructor Details

    • AdjustedPosition

      public AdjustedPosition(com.sun.tools.javac.tree.JCTree position, int startPosAdjustment, int endPosAdjustment)
  • Method Details

    • getStartPosition

      public int getStartPosition()
      Specified by:
      getStartPosition in interface com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
    • getTree

      public com.sun.tools.javac.tree.JCTree getTree()
      Specified by:
      getTree in interface com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
    • getPreferredPosition

      public int getPreferredPosition()
      Specified by:
      getPreferredPosition in interface com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
    • getEndPosition

      public int getEndPosition(com.sun.tools.javac.tree.EndPosTable endPositions)
      Specified by:
      getEndPosition in interface com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition