jcckit.util
Class FactoryException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jcckit.util.FactoryException
All Implemented Interfaces:
Serializable

public class FactoryException
extends RuntimeException

Exception thrown in the case of an error during creation of a new object by Factory.create(java.lang.String).

Author:
Franz-Josef Elmer
See Also:
Serialized Form

Constructor Summary
FactoryException(ConfigParameters configParameters, String key, Object reason)
          Creates a new instance based on the specified configuration parameters and reason object.
 
Method Summary
 String getClassName()
          Returns the fully qualified class name.
 String getFullKey()
          Returns the full class name key.
 Object getReason()
          Returns the reason object causing this exception.
 String toString()
          Renders this instance as follows: jcckit.util.FactoryException: full key = class name: reason.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryException

public FactoryException(ConfigParameters configParameters,
                        String key,
                        Object reason)
Creates a new instance based on the specified configuration parameters and reason object.

If reason is an instance of InvocationTargetException it will be replaced by the wrapped Throwable.

Parameters:
configParameters - Configuration parameters from which the className will be extracted (if it exists, otherwise null will be taken).
reason - The reason causing this exception. Most often an an exception.
Method Detail

getFullKey

public String getFullKey()
Returns the full class name key.


getClassName

public String getClassName()
Returns the fully qualified class name.


getReason

public Object getReason()
Returns the reason object causing this exception.


toString

public String toString()
Renders this instance as follows: jcckit.util.FactoryException: full key = class name: reason.

Overrides:
toString in class Throwable


Copyright © 2013. All Rights Reserved.