SourcePosition (Java SE 11 & JDK 11 ) (original) (raw)
@Deprecated(since="9",
forRemoval=true)
public interface SourcePosition
Deprecated, for removal: This API element is subject to removal in a future version.
This interface describes a source position: filename, line number, and column number.
Since:
1.4
Method Summary
All Methods Instance Methods Abstract Methods Deprecated 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". Method Detail
* #### file [File](../../../../java.base/java/io/File.html "class in java.io") 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](../../../../java.base/java/lang/String.html "class in java.lang") 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](../../../../java.base/java/lang/Object.html#toString%28%29)` in class `[Object](../../../../java.base/java/lang/Object.html "class in java.lang")` Returns: a string representation of the object.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.