|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
S
- the type of source object used by this diagnosticpublic interface Diagnostic<S>
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.
Nested Class Summary | |
---|---|
static class |
Diagnostic.Kind
Kinds of diagnostics, for example, error or warning. |
Field Summary | |
---|---|
static long |
NOPOS
Used to signal that no position is available. |
Method Summary | |
---|---|
String |
getCode()
Gets a diagnostic code indicating the type of diagnostic. |
long |
getColumnNumber()
Gets the column number of the character offset returned by getPosition(). |
long |
getEndPosition()
Gets the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem. |
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(Locale locale)
Gets a localized message for the given locale. |
long |
getPosition()
Gets a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem. |
S |
getSource()
Gets the source object associated with this diagnostic. |
long |
getStartPosition()
Gets the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem. |
Field Detail |
---|
static final long NOPOS
Method Detail |
---|
Diagnostic.Kind getKind()
S getSource()
null
if no source object is associated with the
diagnostic.long getPosition()
getStartPostion() <= getPosition()
getPosition() <= getEndPosition()
NOPOS
if getSource()
would return null
or if
no location is suitablelong getStartPosition()
NOPOS
if and
only if getPosition()
returns NOPOS
long getEndPosition()
NOPOS
if and
only if getPosition()
returns NOPOS
long getLineNumber()
NOPOS
if and only if getPosition()
returns NOPOS
long getColumnNumber()
NOPOS
if and only if getPosition()
returns NOPOS
String getCode()
null
.
String getMessage(Locale locale)
null
use the default locale.
locale
- a locale; might be null
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.