Home » openjdk-7 » com.sun.tools » javac » util » [javadoc | source]
com.sun.tools.javac.util
public static interface: JCDiagnostic.DiagnosticPosition [javadoc | source] A DiagnosticPosition provides information about the positions in a file that gave rise to a diagnostic. It always defines a "preferred" position that most accurately defines the location of the diagnostic, it may also provide a related tree node that spans that location.
Method from com.sun.tools.javac.util.JCDiagnostic$DiagnosticPosition Summary:
getEndPosition,   getPreferredPosition,   getStartPosition,   getTree
Method from com.sun.tools.javac.util.JCDiagnostic$DiagnosticPosition Detail:
 public int getEndPosition(Map<JCTree, Integer> endPosTable)
    If there is a tree node, and if endPositions are available, get the end position of the tree node. Otherwise, just returns the same as getPreferredPosition().
 public int getPreferredPosition()
    Get the position within the file that most accurately defines the location for the diagnostic.
 public int getStartPosition()
    If there is a tree node, get the start position of the tree node. Otherwise, just returns the same as getPreferredPosition().
 public JCTree getTree()
    Gets the tree node, if any, to which the diagnostic applies.