< prev index next >

nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Diagnostic.java

Print this page




  23  * questions.
  24  */
  25 
  26 package jdk.nashorn.api.tree;
  27 
  28 /**
  29  * Interface for diagnostics from tools.  A diagnostic usually reports
  30  * a problem at a specific position in a source file.  However, not
  31  * all diagnostics are associated with a position or a file.
  32  *
  33  * <p>A position is a zero-based character offset from the beginning of
  34  * a file.  Negative values (except {@link #NOPOS}) are not valid
  35  * positions.
  36  *
  37  * <p>Line and column numbers begin at 1.  Negative values (except
  38  * {@link #NOPOS}) and 0 are not valid line or column numbers.
  39  *
  40  * <p>Line terminator is as defined in ECMAScript specification which is one
  41  * of { \u000A, \u000B, \u2028, \u2029 }.
  42  *
  43  * @since 1.9
  44  */
  45 public interface Diagnostic {
  46 
  47     /**
  48      * Kinds of diagnostics, for example, error or warning.
  49      *
  50      * The kind of a diagnostic can be used to determine how the
  51      * diagnostic should be presented to the user. For example,
  52      * errors might be colored red or prefixed with the word "Error",
  53      * while warnings might be colored yellow or prefixed with the
  54      * word "Warning". There is no requirement that the Kind
  55      * should imply any inherent semantic meaning to the message
  56      * of the diagnostic: for example, a tool might provide an
  57      * option to report all warnings as errors.
  58      */
  59     enum Kind {
  60         /**
  61          * Problem which prevents the tool's normal completion.
  62          */
  63         ERROR,




  23  * questions.
  24  */
  25 
  26 package jdk.nashorn.api.tree;
  27 
  28 /**
  29  * Interface for diagnostics from tools.  A diagnostic usually reports
  30  * a problem at a specific position in a source file.  However, not
  31  * all diagnostics are associated with a position or a file.
  32  *
  33  * <p>A position is a zero-based character offset from the beginning of
  34  * a file.  Negative values (except {@link #NOPOS}) are not valid
  35  * positions.
  36  *
  37  * <p>Line and column numbers begin at 1.  Negative values (except
  38  * {@link #NOPOS}) and 0 are not valid line or column numbers.
  39  *
  40  * <p>Line terminator is as defined in ECMAScript specification which is one
  41  * of { \u000A, \u000B, \u2028, \u2029 }.
  42  *
  43  * @since 9
  44  */
  45 public interface Diagnostic {
  46 
  47     /**
  48      * Kinds of diagnostics, for example, error or warning.
  49      *
  50      * The kind of a diagnostic can be used to determine how the
  51      * diagnostic should be presented to the user. For example,
  52      * errors might be colored red or prefixed with the word "Error",
  53      * while warnings might be colored yellow or prefixed with the
  54      * word "Warning". There is no requirement that the Kind
  55      * should imply any inherent semantic meaning to the message
  56      * of the diagnostic: for example, a tool might provide an
  57      * option to report all warnings as errors.
  58      */
  59     enum Kind {
  60         /**
  61          * Problem which prevents the tool's normal completion.
  62          */
  63         ERROR,


< prev index next >