2019-12-08 02:14:42 +01:00
|
|
|
/*
|
|
|
|
|
* sbt
|
|
|
|
|
* Copyright 2011 - 2018, Lightbend, Inc.
|
|
|
|
|
* Copyright 2008 - 2010, Mark Harrah
|
|
|
|
|
* Licensed under Apache License 2.0 (see LICENSE)
|
2010-10-23 22:34:22 +02:00
|
|
|
*/
|
2019-12-08 02:14:42 +01:00
|
|
|
|
2010-10-23 22:34:22 +02:00
|
|
|
package xsbti;
|
|
|
|
|
|
2017-01-26 02:42:15 +01:00
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
2020-01-14 23:19:42 +01:00
|
|
|
public interface Position {
|
|
|
|
|
Optional<Integer> line();
|
|
|
|
|
|
|
|
|
|
String lineContent();
|
|
|
|
|
|
|
|
|
|
Optional<Integer> offset();
|
|
|
|
|
|
|
|
|
|
// pointer to the column position of the error/warning
|
|
|
|
|
Optional<Integer> pointer();
|
|
|
|
|
|
|
|
|
|
Optional<String> pointerSpace();
|
|
|
|
|
|
|
|
|
|
Optional<String> sourcePath();
|
|
|
|
|
|
|
|
|
|
Optional<File> sourceFile();
|
|
|
|
|
|
|
|
|
|
// Default values to avoid breaking binary compatibility
|
|
|
|
|
default Optional<Integer> startOffset() {
|
|
|
|
|
return Optional.empty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default Optional<Integer> endOffset() {
|
|
|
|
|
return Optional.empty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|