Class ClassInstantiationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.github.mjeanroy.dbunit.exception.ClassInstantiationException
All Implemented Interfaces:
Serializable

public class ClassInstantiationException extends RuntimeException
Exception thrown when a class cannot be instantiated because of:
  • Missing empty public constructor.
  • The empty constructor is not public.
  • Etc.
See Also:
  • Method Details

    • getKlass

      public Class<?> getKlass()
      Class that cannot be instantiated.
      Returns:
      The class.
    • missingConstructor

      public static ClassInstantiationException missingConstructor(Class<?> klass)
      Create exception with a message saying that the empty public constructor is missing on given class.
      Parameters:
      klass - The class.
      Returns:
      The exception.
    • instantiationException

      public static ClassInstantiationException instantiationException(Class<?> klass, Exception cause)
      Create exception with given original cause.
      Parameters:
      klass - The class.
      cause - The original exception.
      Returns:
      The exception.
    • instantiationException

      public static ClassInstantiationException instantiationException(Exception cause)
      Create exception with given original cause.
      Parameters:
      cause - The original exception.
      Returns:
      The exception.