Overview

 
Package  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

org.eclipse.emf.common.util
Class BasicDiagnostic

java.lang.Object
  extended byorg.eclipse.emf.common.util.BasicDiagnostic

All Implemented Interfaces:
Diagnostic, DiagnosticChain


public class BasicDiagnostic
extends Object
implements Diagnostic, DiagnosticChain

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, ERROR, INFO, OK, OK_INSTANCE, WARNING
 
Constructor Summary
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.
 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()
           
static IStatus toIStatus(Diagnostic diagnostic)
          Return the diagnostic 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

 

 

severity

protected int severity

The severity.

See Also:
getSeverity()


 

 

message

protected String message

The message.

See Also:
getMessage()


 

 

children

protected List children

The message.

See Also:
getMessage()


 

 

data

protected List data

The data.

See Also:
getData()


 

 

source

protected String source

The source.

See Also:
getSource()


 

 

code

protected int code

The code.

See Also:
getCode()
Constructor Detail

 

 

BasicDiagnostic

public BasicDiagnostic(String source,
                       int code,
                       String message,
                       Object[] data)


 

 

BasicDiagnostic

public BasicDiagnostic(int severity,
                       String source,
                       int code,
                       String message,
                       Object[] data)


 

 

BasicDiagnostic

public BasicDiagnostic(String source,
                       int code,
                       List children,
                       String message,
                       Object[] data)

Method Detail

 

 

dataAsList

protected List dataAsList(Object[] data)


 

 

getSeverity

public int getSeverity()

Description copied from interface: Diagnostic
Returns an indicator of the severity of the problem.

Specified by:
getSeverity in interface Diagnostic


 

 

getMessage

public String getMessage()

Description copied from interface: Diagnostic
Returns a message describing the situation.

Specified by:
getMessage in interface Diagnostic


 

 

getData

public List getData()

Description copied from interface: Diagnostic
Returns the arbitrary associated list of data. The first element is typically the object that is the primary source of the problem; the second element is typically some object describing the problematic feature or aspect of the primary source, and the remaining elements are additional objects associated with or describing the problem.

Specified by:
getData in interface Diagnostic


 

 

getChildren

public List getChildren()

Description copied from interface: Diagnostic
Returns the list of child diagnostics.

Specified by:
getChildren in interface Diagnostic


 

 

getSource

public String getSource()

Description copied from interface: Diagnostic
Returns the unique identifier of the source.

Specified by:
getSource in interface Diagnostic


 

 

getCode

public int getCode()

Description copied from interface: Diagnostic
Returns source-specific identity code.

Specified by:
getCode in interface Diagnostic


 

 

add

public void add(Diagnostic diagnostic)

Description copied from interface: DiagnosticChain
Adds the diagnostic to the chain.

Specified by:
add in interface DiagnosticChain


 

 

addAll

public void addAll(Diagnostic diagnostic)

Description copied from interface: DiagnosticChain
Adds the children of the diagnostic to the chain.

Specified by:
addAll in interface DiagnosticChain


 

 

merge

public void merge(Diagnostic diagnostic)

Description copied from interface: DiagnosticChain
If the diagnostic has children, adds those children, otherwise, adds the diagnostic.

Specified by:
merge in interface DiagnosticChain


 

 

recomputeSeverity

public int recomputeSeverity()


 

 

toIStatus

public static IStatus toIStatus(Diagnostic diagnostic)

Return the diagnostic viewed as an IStatus.


 

 

toString

public String toString()


 

Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Copyright 2001-2004 IBM Corporation and others.
All Rights Reserved.
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD