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 ClassInstantiationException
instantiationException
(Class<?> klass, Exception cause) Create exception with given original cause.static ClassInstantiationException
instantiationException
(Exception cause) Create exception with given original cause.static ClassInstantiationException
missingConstructor
(Class<?> klass) Create exception with a message saying that the empty public constructor is missing on given class.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getKlass
Class that cannot be instantiated.- Returns:
- The class.
-
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.
-