2010-10-23 22:34:22 +02:00
|
|
|
/* sbt -- Simple Build Tool
|
|
|
|
|
* Copyright 2008, 2009, 2010 Mark Harrah
|
|
|
|
|
*/
|
|
|
|
|
package xsbti;
|
|
|
|
|
|
2017-01-26 02:42:15 +01:00
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
2010-10-23 22:34:22 +02:00
|
|
|
public interface Position
|
|
|
|
|
{
|
2017-01-26 02:42:15 +01:00
|
|
|
Optional<Integer> line();
|
2010-10-23 22:34:22 +02:00
|
|
|
String lineContent();
|
2017-01-26 02:42:15 +01:00
|
|
|
Optional<Integer> offset();
|
2010-10-23 22:34:22 +02:00
|
|
|
|
|
|
|
|
// pointer to the column position of the error/warning
|
2017-01-26 02:42:15 +01:00
|
|
|
Optional<Integer> pointer();
|
|
|
|
|
Optional<String> pointerSpace();
|
2010-10-23 22:34:22 +02:00
|
|
|
|
2017-01-26 02:42:15 +01:00
|
|
|
Optional<String> sourcePath();
|
|
|
|
|
Optional<File> sourceFile();
|
2018-08-12 18:03:22 +02:00
|
|
|
|
|
|
|
|
// Default values to avoid breaking binary compatibility
|
|
|
|
|
default Optional<Integer> startOffset() { return Optional.empty(); }
|
|
|
|
|
default Optional<Integer> endOffset() { return Optional.empty(); }
|
2018-08-13 19:00:41 +02:00
|
|
|
default Optional<Integer> startLine() { return Optional.empty(); }
|
|
|
|
|
default Optional<Integer> startColumn() { return Optional.empty(); }
|
|
|
|
|
default Optional<Integer> endLine() { return Optional.empty(); }
|
|
|
|
|
default Optional<Integer> endColumn() { return Optional.empty(); }
|
2017-01-26 02:42:15 +01:00
|
|
|
}
|