|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.common.util.BasicDiagnostic
A basic implementation of a diagostic that that also acts as a chain.
| Field Summary | |
protected List |
children
The message. |
protected int |
code
The code. |
protected List |
data
The data. |
protected String |
message
The message. |
protected int |
severity
The severity. |
protected String |
source
The source. |
| Fields inherited from interface org.eclipse.emf.common.util.Diagnostic |
CANCEL, CANCEL_INSTANCE, ERROR, INFO, OK, OK_INSTANCE, WARNING |
| Constructor Summary | |
BasicDiagnostic()
Default Constructor (no initialization for local parameters) |
|
BasicDiagnostic(int severity,
String source,
int code,
String message,
Object[] data)
|
|
BasicDiagnostic(String source,
int code,
List children,
String message,
Object[] data)
|
|
BasicDiagnostic(String source,
int code,
String message,
Object[] data)
|
|
| Method Summary | |
void |
add(Diagnostic diagnostic)
Adds the diagnostic to the chain. |
void |
addAll(Diagnostic diagnostic)
Adds the children of the diagnostic to the chain. |
protected List |
dataAsList(Object[] data)
|
List |
getChildren()
Returns the list of child diagnostics. |
int |
getCode()
Returns source-specific identity code. |
List |
getData()
Returns the arbitrary associated list of data. |
Throwable |
getException()
Returns the first throwable object available in the data list,
which is set when this diagnostic is instantiated. |
String |
getMessage()
Returns a message describing the situation. |
int |
getSeverity()
Returns an indicator of the severity of the problem. |
String |
getSource()
Returns the unique identifier of the source. |
void |
merge(Diagnostic diagnostic)
If the diagnostic has children,
adds those children,
otherwise, adds the diagnostic. |
int |
recomputeSeverity()
|
protected void |
setCode(int code)
|
protected void |
setSeverity(int severity)
|
protected void |
setSource(String source)
|
static Diagnostic |
toDiagnostic(Throwable throwable)
Returns the throwable viewed as a Diagnostic. |
static IStatus |
toIStatus(Diagnostic diagnostic)
Returns the diagnostic viewed as an IStatus. |
static IStatus |
toIStatus(DiagnosticException diagnosticException)
Returns the diagnostic exception viewed as an IStatus. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int severity
getSeverity()protected String message
getMessage()protected List children
getMessage()protected List data
getData()protected String source
getSource()protected int code
getCode()| Constructor Detail |
public BasicDiagnostic()
public BasicDiagnostic(String source,
int code,
String message,
Object[] data)
public BasicDiagnostic(int severity,
String source,
int code,
String message,
Object[] data)
public BasicDiagnostic(String source,
int code,
List children,
String message,
Object[] data)
| Method Detail |
protected List dataAsList(Object[] data)
protected void setSeverity(int severity)
public int getSeverity()
Diagnostic
getSeverity in interface Diagnosticpublic String getMessage()
Diagnostic
getMessage in interface Diagnosticpublic List getData()
Diagnostic
getData in interface Diagnosticpublic List getChildren()
Diagnosticdiagnostics.
getChildren in interface Diagnosticprotected void setSource(String source)
public String getSource()
Diagnostic
getSource in interface Diagnosticprotected void setCode(int code)
public int getCode()
Diagnosticsource-specific identity code.
getCode in interface Diagnosticpublic void add(Diagnostic diagnostic)
DiagnosticChain
add in interface DiagnosticChainpublic void addAll(Diagnostic diagnostic)
DiagnosticChainchildren of the diagnostic to the chain.
addAll in interface DiagnosticChainpublic void merge(Diagnostic diagnostic)
DiagnosticChainchildren,
adds those children,
otherwise, adds the diagnostic.
merge in interface DiagnosticChainpublic int recomputeSeverity()
public Throwable getException()
data list,
which is set when this diagnostic is instantiated.
getException in interface Diagnosticpublic static IStatus toIStatus(Diagnostic diagnostic)
IStatus.
public static IStatus toIStatus(DiagnosticException diagnosticException)
IStatus.
public static Diagnostic toDiagnostic(Throwable throwable)
Diagnostic.
throwable -
Diagnosticpublic String toString()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||