org.jdiagnose
Class Diagnostics

java.lang.Object
  extended byorg.jdiagnose.Diagnostics
All Implemented Interfaces:
DiagnosticContainer

public class Diagnostics
extends java.lang.Object
implements DiagnosticContainer

Used to contain and run a number of Diagnostic instances.

Author:
jamie

Constructor Summary
Diagnostics()
          Create an empty Diagnostics.
Diagnostics(java.util.List diagnosticContainers, java.util.List diagnostics)
          Create a Diagnostics with a list of children
 
Method Summary
 void addDiagnostic(Diagnostic diagnostic)
          Add a diagnostic to the diagnostics contained in this class.
 void addDiagnosticContainer(DiagnosticContainer container)
           
 java.util.List getDiagnosticContainers()
           
 java.util.List getDiagnostics()
          Returns any children of this diagnostic.
 java.lang.String getName()
          Returns the name of the diagnostic.
 void setDiagnosticContainers(java.util.List diagnosticContainers)
           
 void setDiagnostics(java.util.List diagnostics)
          Set the diagnostics that will be run
 void setName(java.lang.String name)
          Sets the name of this diagnostic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Diagnostics

public Diagnostics()
Create an empty Diagnostics. Diagnostics will have to be set using setDiagnostics()

See Also:
setDiagnostics(List)

Diagnostics

public Diagnostics(java.util.List diagnosticContainers,
                   java.util.List diagnostics)
Create a Diagnostics with a list of children

Parameters:
diagnostics - diagnostics that will get run with diagnose() is called on this class.
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of this diagnostic

Parameters:
name - the new Fully Qualified Name

getName

public java.lang.String getName()
Description copied from interface: DiagnosticContainer
Returns the name of the diagnostic. Should be a Fully Qualified Name, usually defaults to the classname (and method name in the case of the DiagnosticUnit)

Specified by:
getName in interface DiagnosticContainer
Returns:
the name of this Diagnostic, defaults to the FQN class name.

setDiagnostics

public void setDiagnostics(java.util.List diagnostics)
Set the diagnostics that will be run

Parameters:
diagnostics -

setDiagnosticContainers

public void setDiagnosticContainers(java.util.List diagnosticContainers)

addDiagnostic

public void addDiagnostic(Diagnostic diagnostic)
Add a diagnostic to the diagnostics contained in this class. Once this diagnostic has been set into a DiagnosticRunner this method should not be called.

Parameters:
diagnostic - another diagnostic that should be run when diagnose() is run.

getDiagnostics

public java.util.List getDiagnostics()
Description copied from interface: DiagnosticContainer
Returns any children of this diagnostic.

Specified by:
getDiagnostics in interface DiagnosticContainer
Returns:
a list of child diagnostics

getDiagnosticContainers

public java.util.List getDiagnosticContainers()
Specified by:
getDiagnosticContainers in interface DiagnosticContainer
See Also:
DiagnosticContainer.getDiagnosticContainers()

addDiagnosticContainer

public void addDiagnosticContainer(DiagnosticContainer container)


Copyright © 2004-2005 Grape Design Limited. All Rights Reserved.