public interface Diagnostic
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 }.
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
Diagnostic.Kind |
Kinds of diagnostics, for example, error or warning.
|
| Modifier and Type | Field | Description |
|---|---|---|
static long |
NOPOS |
Used to signal that no position is available.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getCode() |
Gets a diagnostic code indicating the type of diagnostic.
|
long |
getColumnNumber() |
Gets the column number of the character offset returned by
getPosition().
|
String |
getFileName() |
Gets the source file name.
|
Diagnostic.Kind |
getKind() |
Gets the kind of this diagnostic, for example, error or
warning.
|
long |
getLineNumber() |
Gets the line number of the character offset returned by
getPosition().
|
String |
getMessage() |
Gets a message for this diagnostic.
|
long |
getPosition() |
Gets a character offset from the beginning of the source object
associated with this diagnostic that indicates the location of
the problem.
|
static final long NOPOS
Diagnostic.Kind getKind()
long getPosition()
getStartPostion() <= getPosition()
getPosition() <= getEndPosition()
NOPOS if no location is suitableString getFileName()
long getLineNumber()
NOPOS if and only if getPosition() returns NOPOSlong getColumnNumber()
NOPOS if and only if getPosition() returns NOPOSString getCode()
null.String getMessage()
Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2014, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Debian+0-9b153-2