Table of Contents
首页 API Docs 工具
openjdk / 11.0.11 / jdk.javadoc / com / sun / javadoc / sourceposition.html /

Interface SourcePosition

@Deprecated(since="9",
            forRemoval=true)
public interface SourcePosition
Deprecated, for removal: This API element is subject to removal in a future version.
The declarations in this package have been superseded by those in the package jdk.javadoc.doclet. For more information, see the Migration Guide in the documentation for that package.

This interface describes a source position: filename, line number, and column number.

Since:
1.4

Methods

Modifier and Type Method Description
int column()

Deprecated, for removal: This API element is subject to removal in a future version.

The column in the source file.

File file()

Deprecated, for removal: This API element is subject to removal in a future version.

The source file.

int line()

Deprecated, for removal: This API element is subject to removal in a future version.

The line in the source file.

String toString()

Deprecated, for removal: This API element is subject to removal in a future version.

Convert the source position to the form "Filename:line".

Methods

file

File file()
Deprecated, for removal: This API element is subject to removal in a future version.

The source file. Returns null if no file information is available.

Returns:
the source file as a File.

line

int line()
Deprecated, for removal: This API element is subject to removal in a future version.

The line in the source file. The first line is numbered 1; 0 means no line number information is available.

Returns:
the line number in the source file as an integer.

column

int column()
Deprecated, for removal: This API element is subject to removal in a future version.

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.

Returns:
the column on the source line as an integer.

toString

String toString()
Deprecated, for removal: This API element is subject to removal in a future version.

Convert the source position to the form "Filename:line".

Overrides:
toString in class Object
Returns:
a string representation of the object.

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/com/sun/javadoc/SourcePosition.html