Skip to content
This repository has been archived by the owner. It is now read-only.

Commit fad2dea

Browse files
committed
Merge branch 'develop' of ../util-interface into wip/graft
2 parents 60085d8 + 6a1a31a commit fad2dea

File tree

5 files changed

+82
-0
lines changed

5 files changed

+82
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* sbt -- Simple Build Tool
2+
* Copyright 2009 Mark Harrah
3+
*/
4+
package xsbti;
5+
6+
import java.util.function.Supplier;
7+
8+
public interface Logger {
9+
void error(Supplier<String> msg);
10+
void warn(Supplier<String> msg);
11+
void info(Supplier<String> msg);
12+
void debug(Supplier<String> msg);
13+
void trace(Supplier<Throwable> exception);
14+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* sbt -- Simple Build Tool
2+
* Copyright 2008, 2009, 2010 Mark Harrah
3+
*/
4+
package xsbti;
5+
6+
import java.io.File;
7+
import java.util.Optional;
8+
9+
public interface Position
10+
{
11+
Optional<Integer> line();
12+
String lineContent();
13+
Optional<Integer> offset();
14+
15+
// pointer to the column position of the error/warning
16+
Optional<Integer> pointer();
17+
Optional<String> pointerSpace();
18+
19+
Optional<String> sourcePath();
20+
Optional<File> sourceFile();
21+
22+
// Default values to avoid breaking binary compatibility
23+
default Optional<Integer> startOffset() { return Optional.empty(); }
24+
default Optional<Integer> endOffset() { return Optional.empty(); }
25+
default Optional<Integer> startLine() { return Optional.empty(); }
26+
default Optional<Integer> startColumn() { return Optional.empty(); }
27+
default Optional<Integer> endLine() { return Optional.empty(); }
28+
default Optional<Integer> endColumn() { return Optional.empty(); }
29+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* sbt -- Simple Build Tool
2+
* Copyright 2008, 2009, 2010 Mark Harrah
3+
*/
4+
package xsbti;
5+
6+
import java.util.Optional;
7+
8+
public interface Problem
9+
{
10+
String category();
11+
Severity severity();
12+
String message();
13+
Position position();
14+
15+
// Default value to avoid breaking binary compatibility
16+
/**
17+
* If present, the string shown to the user when displaying this Problem.
18+
* Otherwise, the Problem will be shown in an implementation-defined way
19+
* based on the values of its other fields.
20+
*/
21+
default Optional<String> rendered() { return Optional.empty(); }
22+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* sbt -- Simple Build Tool
2+
* Copyright 2008, 2009, 2010 Mark Harrah
3+
*/
4+
package xsbti;
5+
6+
public enum Severity
7+
{
8+
Info, Warn, Error
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package xsbti;
2+
3+
/** Used to pass a pair of values. */
4+
public interface T2<A1, A2>
5+
{
6+
public A1 get1();
7+
public A2 get2();
8+
}

0 commit comments

Comments
 (0)