Class ClassInstantiationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.github.mjeanroy.dbunit.exception.ClassInstantiationException
- All Implemented Interfaces:
Serializable
Exception thrown when a class cannot be instantiated because of:
- Missing empty public constructor.
- The empty constructor is not public.
- Etc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionClass<?> getKlass()Class that cannot be instantiated.static ClassInstantiationExceptioninstantiationException(Class<?> klass, Exception cause) Create exception with given original cause.static ClassInstantiationExceptioninstantiationException(Exception cause) Create exception with given original cause.static ClassInstantiationExceptionmissingConstructor(Class<?> klass) Create exception with a message saying that the empty public constructor is missing on given class.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getKlass
-
missingConstructor
Create exception with a message saying that the empty public constructor is missing on given class.- Parameters:
klass- The class.- Returns:
- The exception.
-
instantiationException
Create exception with given original cause.- Parameters:
klass- The class.cause- The original exception.- Returns:
- The exception.
-
instantiationException
Create exception with given original cause.- Parameters:
cause- The original exception.- Returns:
- The exception.
-