From c3eb841ce8ae349d9820dbf6c18884955e74254e Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 20 Nov 2016 00:02:50 +0100 Subject: Make every project use the new directory structure --- .../dotty/tools/dotc/interfaces/Diagnostic.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 interfaces/src/dotty/tools/dotc/interfaces/Diagnostic.java (limited to 'interfaces/src/dotty/tools/dotc/interfaces/Diagnostic.java') diff --git a/interfaces/src/dotty/tools/dotc/interfaces/Diagnostic.java b/interfaces/src/dotty/tools/dotc/interfaces/Diagnostic.java new file mode 100644 index 000000000..c46360afa --- /dev/null +++ b/interfaces/src/dotty/tools/dotc/interfaces/Diagnostic.java @@ -0,0 +1,26 @@ +package dotty.tools.dotc.interfaces; + +import java.util.Optional; + +/** A diagnostic is a message emitted during the compilation process. + * + * It can either be an error, a warning or an information. + * + * User code should not implement this interface, but it may have to + * manipulate objects of this type. + */ +public interface Diagnostic { + public static final int ERROR = 2; + public static final int WARNING = 1; + public static final int INFO = 0; + + /** @return The message to report */ + String message(); + + /** @return Level of the diagnostic, can be either ERROR, WARNING or INFO */ + int level(); + + /** @return The position in a source file of the code that caused this diagnostic + * to be emitted. */ + Optional position(); +} -- cgit v1.2.3