org.spicefactory.cinnamon.reflect.util
Class ObjectInstantiationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.spicefactory.cinnamon.reflect.util.ObjectInstantiationException
All Implemented Interfaces:
Serializable

public class ObjectInstantiationException
extends RuntimeException

Exception thrown when reflectively creating a new instance fails.

Author:
Jens Halm
See Also:
Serialized Form

Constructor Summary
ObjectInstantiationException(Class<?> type)
          Creates a new ObjectInstantiationException
ObjectInstantiationException(Class<?> type, Throwable cause)
          Creates a new ObjectInstantiationException
 
Method Summary
 Class<?> getType()
          Returns the Class for which instantiation failed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectInstantiationException

public ObjectInstantiationException(Class<?> type,
                                    Throwable cause)
Creates a new ObjectInstantiationException

Parameters:
type - the class that could not be instantiated
cause - the root cause

ObjectInstantiationException

public ObjectInstantiationException(Class<?> type)
Creates a new ObjectInstantiationException

Parameters:
type - the class that could not be instantiated
Method Detail

getType

public Class<?> getType()
Returns the Class for which instantiation failed.

Returns:
the Class for which instantiation failed