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.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Diagnostic.
Kinds of diagnostics, for example, error or warning. |
| Modifier and Type | Field and Description |
|---|---|
| public static final long | NOPOS
Used to signal that no position is available. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public long | |
| public long | getEndPosition()
Returns the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem. |
| public Diagnostic. | Returns: the kind of this diagnosticReturns the kind of this diagnostic, for example, error or warning. |
| public long | |
| public String | Returns: a localized messagea locale; might be locale)nullReturns a localized message for the given locale. |
| public long | Returns: character offset from beginning of source;NOPOS if getSource() would return null or if
no location is suitableReturns a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem. |
| public S | Returns: the source object associated with this diagnostic.null if no source object is associated with the
diagnostic.Returns the source object associated with this diagnostic. |
| public long | getStartPosition()
Returns the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem. |
| NOPOS | back to summary |
|---|---|
| public static final long NOPOS Used to signal that no position is available. | |
| getCode | back to summary |
|---|---|
| public String getCode() Returns a diagnostic code indicating the type of diagnostic. The
code is implementation-dependent and might be
| |
| getColumnNumber | back to summary |
|---|---|
| public long getColumnNumber() Returns the column number of the character offset returned by getPosition().
| |
| getEndPosition | back to summary |
|---|---|
| public long getEndPosition() Returns the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem.
| |
| getKind | back to summary |
|---|---|
| public Diagnostic. Returns the kind of this diagnostic, for example, error or warning.
| |
| getLineNumber | back to summary |
|---|---|
| public long getLineNumber() Returns the line number of the character offset returned by getPosition().
| |
| getMessage | back to summary |
|---|---|
| public String getMessage(Locale locale) Returns a localized message for the given locale. The actual
message is implementation-dependent. If the locale is | |
| getPosition | back to summary |
|---|---|
| public long getPosition() Returns 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:
| |
| getSource | back to summary |
|---|---|
| public S getSource() Returns the source object associated with this diagnostic.
| |
| getStartPosition | back to summary |
|---|---|
| public long getStartPosition() Returns the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Diagnostic. | ERROR
Problem which prevents the tool's normal completion. |
| public static final Diagnostic. | MANDATORY_WARNING
Problem similar to a warning, but is mandated by the tool's specification. |
| public static final Diagnostic. | NOTE
Informative message from the tool. |
| public static final Diagnostic. | OTHER
Diagnostic which does not fit within the other kinds. |
| public static final Diagnostic. | WARNING
Problem which does not usually prevent the tool from completing normally. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Diagnostic. | |
| public static Diagnostic. |
| ERROR | back to summary |
|---|---|
| public static final Diagnostic. Problem which prevents the tool's normal completion. | |
| MANDATORY_WARNING | back to summary |
|---|---|
| public static final Diagnostic. Problem similar to a warning, but is mandated by the tool's specification. For example, the Java Language Specification mandates warnings on certain unchecked operations and the use of deprecated methods. | |
| NOTE | back to summary |
|---|---|
| public static final Diagnostic. Informative message from the tool. | |
| OTHER | back to summary |
|---|---|
| public static final Diagnostic. Diagnostic which does not fit within the other kinds. | |
| WARNING | back to summary |
|---|---|
| public static final Diagnostic. Problem which does not usually prevent the tool from completing normally. | |
| Kind | back to summary |
|---|---|
| private Kind() | |
| valueOf | back to summary |
|---|---|
| public static Diagnostic. | |
| values | back to summary |
|---|---|
| public static Diagnostic. | |