org.semwebcentral.sweetrules.infrastructure
Class SweetCompositeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.semwebcentral.sweetrules.infrastructure.SweetException
              extended byorg.semwebcentral.sweetrules.infrastructure.SweetCompositeException
All Implemented Interfaces:
java.io.Serializable

public class SweetCompositeException
extends SweetException

Created on Nov 18, 2004 A composite exception having multiple exceptions

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy
See Also:
Serialized Form

Field Summary
private  java.util.Vector exceptionVector
          The exception vector
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
SweetCompositeException()
          The constructor for the composite exception
SweetCompositeException(java.lang.String message)
           
 
Method Summary
 void addException(java.lang.Exception ex)
          Adds the specified exception
 java.lang.String getMessage()
          Gets the exception message by composing all the messages
private  void initialize()
          Utility method to initialize
 java.util.Iterator iterator()
          Returns an iterator for the exception objects
 int size()
          Gets the number of exception objects in the Composite exception
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exceptionVector

private java.util.Vector exceptionVector
The exception vector

Constructor Detail

SweetCompositeException

public SweetCompositeException()
The constructor for the composite exception


SweetCompositeException

public SweetCompositeException(java.lang.String message)
Parameters:
message - The exception message
Method Detail

addException

public void addException(java.lang.Exception ex)
Adds the specified exception

Parameters:
ex - The exception to add

initialize

private void initialize()
Utility method to initialize


size

public int size()
Gets the number of exception objects in the Composite exception

Returns:
The number of exceptions in the composite exception

iterator

public java.util.Iterator iterator()
Returns an iterator for the exception objects

Returns:
The iterator for the exception objects

getMessage

public java.lang.String getMessage()
Gets the exception message by composing all the messages