Class SourcePositionImpl

  • All Implemented Interfaces:
    SourcePosition

    @Deprecated
    public class SourcePositionImpl
    extends java.lang.Object
    implements SourcePosition
    Deprecated.
    A source position: filename, line number, and column number.

    This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

    Since:
    J2SE1.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javax.tools.FileObject filename
      Deprecated.
       
      (package private) com.sun.tools.javac.util.Position.LineMap lineMap
      Deprecated.
       
      (package private) int position
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SourcePositionImpl​(javax.tools.FileObject file, int position, com.sun.tools.javac.util.Position.LineMap lineMap)
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int column()
      Deprecated.
      The column in the source file.
      java.io.File file()
      Deprecated.
      The source file.
      javax.tools.FileObject fileObject()
      Deprecated.
      The source file.
      int line()
      Deprecated.
      The line in the source file.
      static SourcePosition make​(javax.tools.FileObject file, int pos, com.sun.tools.javac.util.Position.LineMap lineMap)
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
      Convert the source position to the form "Filename:line".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • filename

        javax.tools.FileObject filename
        Deprecated.
      • position

        int position
        Deprecated.
      • lineMap

        com.sun.tools.javac.util.Position.LineMap lineMap
        Deprecated.
    • Constructor Detail

      • SourcePositionImpl

        private SourcePositionImpl​(javax.tools.FileObject file,
                                   int position,
                                   com.sun.tools.javac.util.Position.LineMap lineMap)
        Deprecated.
    • Method Detail

      • file

        public java.io.File file()
        Deprecated.
        The source file. Returns null if no file information is available.
        Specified by:
        file in interface SourcePosition
        Returns:
        the source file as a File.
      • fileObject

        public javax.tools.FileObject fileObject()
        Deprecated.
        The source file. Returns null if no file information is available.
      • line

        public int line()
        Deprecated.
        The line in the source file. The first line is numbered 1; 0 means no line number information is available.
        Specified by:
        line in interface SourcePosition
        Returns:
        the line number in the source file as an integer.
      • column

        public int column()
        Deprecated.
        The column in the source file. The first column is numbered 1; 0 means no column information is available. Columns count characters in the input stream; a tab advances the column number to the next 8-column tab stop.
        Specified by:
        column in interface SourcePosition
        Returns:
        the column on the source line as an integer.
      • make

        public static SourcePosition make​(javax.tools.FileObject file,
                                          int pos,
                                          com.sun.tools.javac.util.Position.LineMap lineMap)
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Description copied from interface: SourcePosition
        Convert the source position to the form "Filename:line".
        Specified by:
        toString in interface SourcePosition
        Overrides:
        toString in class java.lang.Object