Package com.google.errorprone.fixes
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 Summary
Fields Modifier and Type Field Description protected int
endPositionAdjustment
protected com.sun.tools.javac.tree.JCTree
position
protected int
startPositionAdjustment
-
Constructor Summary
Constructors Constructor Description AdjustedPosition(com.sun.tools.javac.tree.JCTree position, int startPosAdjustment, int endPosAdjustment)
-
Method Summary
Modifier and Type Method Description int
getEndPosition(com.sun.tools.javac.tree.EndPosTable endPositions)
int
getPreferredPosition()
int
getStartPosition()
com.sun.tools.javac.tree.JCTree
getTree()
-
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 interfacecom.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
-
getTree
public com.sun.tools.javac.tree.JCTree getTree()- Specified by:
getTree
in interfacecom.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
-
getPreferredPosition
public int getPreferredPosition()- Specified by:
getPreferredPosition
in interfacecom.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
-
getEndPosition
public int getEndPosition(com.sun.tools.javac.tree.EndPosTable endPositions)- Specified by:
getEndPosition
in interfacecom.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
-