< prev index next >

## 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 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,
      64         /**
      65          * Problem which does not usually prevent the tool from
      66          * completing normally.
      67          */
      68         WARNING,
      69         /**
      70          * Problem similar to a warning, but is mandated by the tool's
      71          * specification.  For example, the Java&trade; Language
      72          * Specification mandates warnings on certain
      73          * unchecked operations and the use of deprecated methods.
      74          */
      75         MANDATORY_WARNING,
      76         /**
      77          * Informative message from the tool.
      78          */
      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  * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
      44  * are deprecated with the intent to remove them in a future release.
      45  *
      46  * @since 9
      47  */
      48 @Deprecated(since="11", forRemoval=true)
      49 public interface Diagnostic {
      50
      51     /**
      52      * Kinds of diagnostics, for example, error or warning.
      53      *
      54      * The kind of a diagnostic can be used to determine how the
      55      * diagnostic should be presented to the user. For example,
      56      * errors might be colored red or prefixed with the word "Error",
      57      * while warnings might be colored yellow or prefixed with the
      58      * word "Warning". There is no requirement that the Kind
      59      * should imply any inherent semantic meaning to the message
      60      * of the diagnostic: for example, a tool might provide an
      61      * option to report all warnings as errors.
      62      */
      63     @Deprecated(since="11", forRemoval=true)
      64     enum Kind {
      65         /**
      66          * Problem which prevents the tool's normal completion.
      67          */
      68         ERROR,
      69         /**
      70          * Problem which does not usually prevent the tool from
      71          * completing normally.
      72          */
      73         WARNING,
      74         /**
      75          * Problem similar to a warning, but is mandated by the tool's
      76          * specification.  For example, the Java&trade; Language
      77          * Specification mandates warnings on certain
      78          * unchecked operations and the use of deprecated methods.
      79          */
      80         MANDATORY_WARNING,
      81         /**
      82          * Informative message from the tool.
      83          */

< prev index next >