- 
 @Deprecated(since="11", forRemoval=true) public interface Diagnostic Deprecated, for removal: This API element is subject to removal in a future version.Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.Interface for diagnostics from tools. A diagnostic usually reports a problem at a specific position in a source file. However, not all diagnostics are associated with a position or a file.A position is a zero-based character offset from the beginning of a file. Negative values (except NOPOS) are not valid positions.Line and column numbers begin at 1. Negative values (except NOPOS) and 0 are not valid line or column numbers.Line terminator is as defined in ECMAScript specification which is one of { \u000A, \u000B, \u2028, \u2029 }. - Since:
- 9
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classDiagnostic.KindDeprecated, for removal: This API element is subject to removal in a future version.Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
 - 
Field SummaryFields Modifier and Type Field Description static longNOPOSDeprecated, for removal: This API element is subject to removal in a future version.Used to signal that no position is available.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description StringgetCode()Deprecated, for removal: This API element is subject to removal in a future version.Gets a diagnostic code indicating the type of diagnostic.longgetColumnNumber()Deprecated, for removal: This API element is subject to removal in a future version.Gets the column number of the character offset returned by getPosition().StringgetFileName()Deprecated, for removal: This API element is subject to removal in a future version.Gets the source file name.Diagnostic.KindgetKind()Deprecated, for removal: This API element is subject to removal in a future version.Gets the kind of this diagnostic, for example, error or warning.longgetLineNumber()Deprecated, for removal: This API element is subject to removal in a future version.Gets the line number of the character offset returned by getPosition().StringgetMessage()Deprecated, for removal: This API element is subject to removal in a future version.Gets a message for this diagnostic.longgetPosition()Deprecated, for removal: This API element is subject to removal in a future version.Gets a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem.
 
- 
- 
- 
Field Detail- 
NOPOSstatic final long NOPOS Deprecated, for removal: This API element is subject to removal in a future version.Used to signal that no position is available.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getKindDiagnostic.Kind getKind() Deprecated, for removal: This API element is subject to removal in a future version.Gets the kind of this diagnostic, for example, error or warning.- Returns:
- the kind of this diagnostic
 
 - 
getPositionlong getPosition() Deprecated, for removal: This API element is subject to removal in a future version.Gets a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem. In addition, the following must be true:getStartPostion() <= getPosition()getPosition() <= getEndPosition()- Returns:
- character offset from beginning of source; NOPOSif no location is suitable
 
 - 
getFileNameString getFileName() Deprecated, for removal: This API element is subject to removal in a future version.Gets the source file name.- Returns:
- the file name or null if not available
 
 - 
getLineNumberlong getLineNumber() Deprecated, for removal: This API element is subject to removal in a future version.Gets the line number of the character offset returned by getPosition().- Returns:
- a line number or NOPOSif and only ifgetPosition()returnsNOPOS
 
 - 
getColumnNumberlong getColumnNumber() Deprecated, for removal: This API element is subject to removal in a future version.Gets the column number of the character offset returned by getPosition().- Returns:
- a column number or NOPOSif and only ifgetPosition()returnsNOPOS
 
 - 
getCodeString getCode() Deprecated, for removal: This API element is subject to removal in a future version.Gets a diagnostic code indicating the type of diagnostic. The code is implementation-dependent and might benull.- Returns:
- a diagnostic code
 
 - 
getMessageString getMessage() Deprecated, for removal: This API element is subject to removal in a future version.Gets a message for this diagnostic.- Returns:
- a message
 
 
- 
 
-