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
Modifier and TypeFieldDescriptionprotected final int
protected final com.sun.tools.javac.tree.JCTree
protected final int
-
Constructor Summary
ConstructorDescriptionAdjustedPosition
(com.sun.tools.javac.tree.JCTree position, int startPosAdjustment, int endPosAdjustment) -
Method Summary
Modifier and TypeMethodDescriptionint
getEndPosition
(com.sun.tools.javac.tree.EndPosTable endPositions) int
int
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
-