marf.util
Class ExceptionFactory

java.lang.Object
  extended by marf.util.ExceptionFactory

public class ExceptionFactory
extends java.lang.Object

Factory for producing various MARF exception objects.

$Id: ExceptionFactory.java,v 1.2 2007/12/01 00:31:01 mokhov Exp $

Since:
0.3.0.6, Nov 26, 2007
Version:
$Revision: 1.2 $
Author:
Serguei Mokhov

Constructor Summary
protected ExceptionFactory()
          Factories are often singletons, so technically, this constructor should be private and the getInstance() method should be present.
 
Method Summary
static ClassificationException createClassificationException()
           
static ClassificationException createClassificationException(java.lang.Exception poException)
           
static ClassificationException createClassificationException(java.lang.String pstrMessage)
           
static ClassificationException createClassificationException(java.lang.String pstrMessage, java.lang.Exception poException)
           
static MARFException createMARFException()
          Creates an instance of the MARFException object.
static MARFException createMARFException(java.lang.Exception poException)
          Creates an instance of the MARFException object.
static MARFException createMARFException(java.lang.String pstrMessage)
          Creates an instance of the MARFException object with a custom message.
static MARFException createMARFException(java.lang.String pstrMessage, java.lang.Exception poException)
          Creates an instance of the MARFException object with a custom message and an exception object.
static MARFRuntimeException createMARFRuntimeException()
           
static MARFRuntimeException createMARFRuntimeException(java.lang.Exception poException)
           
static MARFRuntimeException createMARFRuntimeException(java.lang.String pstrMessage)
           
static MARFRuntimeException createMARFRuntimeException(java.lang.String pstrMessage, java.lang.Exception poException)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionFactory

protected ExceptionFactory()
Factories are often singletons, so technically, this constructor should be private and the getInstance() method should be present. We relax this rule to allow inheritance to the wishing parties.

Method Detail

createMARFException

public static MARFException createMARFException()
Creates an instance of the MARFException object.

Returns:
default MARFException
See Also:
MARFException.MARFException()

createMARFException

public static MARFException createMARFException(java.lang.String pstrMessage)
Creates an instance of the MARFException object with a custom message.

Parameters:
pstrMessage - the custom message
Returns:
MARFException with the custom message
See Also:
MARFException.MARFException(String)

createMARFException

public static MARFException createMARFException(java.lang.String pstrMessage,
                                                java.lang.Exception poException)
Creates an instance of the MARFException object with a custom message and an exception object.

Parameters:
pstrMessage - the custom message
poException - the exception object to encapsulate
Returns:
MARFException with the custom message and the stack trace provided by the poException parameter
See Also:
MARFException.MARFException(String, Exception)

createMARFException

public static MARFException createMARFException(java.lang.Exception poException)
Creates an instance of the MARFException object.

Parameters:
poException - the exception object to encapsulate
Returns:
MARFException with the stack trace provided by the poException parameter
See Also:
MARFException.MARFException(Exception)

createMARFRuntimeException

public static MARFRuntimeException createMARFRuntimeException()

createMARFRuntimeException

public static MARFRuntimeException createMARFRuntimeException(java.lang.String pstrMessage)

createMARFRuntimeException

public static MARFRuntimeException createMARFRuntimeException(java.lang.String pstrMessage,
                                                              java.lang.Exception poException)

createMARFRuntimeException

public static MARFRuntimeException createMARFRuntimeException(java.lang.Exception poException)

createClassificationException

public static ClassificationException createClassificationException()

createClassificationException

public static ClassificationException createClassificationException(java.lang.String pstrMessage)

createClassificationException

public static ClassificationException createClassificationException(java.lang.String pstrMessage,
                                                                    java.lang.Exception poException)

createClassificationException

public static ClassificationException createClassificationException(java.lang.Exception poException)


SourceForge Logo