org.springframework.beans

## 类 BeanInstantiationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.springframework.core.NestedRuntimeException
        - - org.springframework.beans.BeansException
          - - org.springframework.beans.FatalBeanException
            - - org.springframework.beans.BeanInstantiationException

- 所有已实现的接口:
    Serializable

      public class BeanInstantiationException
      extends FatalBeanException

  Exception thrown when instantiation of a bean failed. Carries the offending bean class.
  从以下版本开始:
    1.2.8
  作者:
    Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `BeanInstantiationException(Class<?> beanClass, String msg)` Create a new BeanInstantiationException.
    `BeanInstantiationException(Class<?> beanClass, String msg, Throwable cause)` Create a new BeanInstantiationException.
    `BeanInstantiationException(Constructor<?> constructor, String msg, Throwable cause)` Create a new BeanInstantiationException.
    `BeanInstantiationException(Method constructingMethod, String msg, Throwable cause)` Create a new BeanInstantiationException.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Class<?>` | `getBeanClass()` Return the offending bean class (never `null`).
    `Method` | `getConstructingMethod()` Return the delegate for bean construction purposes, if known.
    `Constructor<?>` | `getConstructor()` Return the offending constructor, if known.

    - ### 从类继承的方法 org.springframework.core.NestedRuntimeException

      `contains, getMessage, getMostSpecificCause, getRootCause`

    - ### 从类继承的方法 java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### BeanInstantiationException

          public BeanInstantiationException(Class<?> beanClass,
                                            String msg)

      Create a new BeanInstantiationException.
      参数:
        `beanClass` - the offending bean class
        `msg` - the detail message

    - #### BeanInstantiationException

          public BeanInstantiationException(Class<?> beanClass,
                                            String msg,
                                            @Nullable
                                            Throwable cause)

      Create a new BeanInstantiationException.
      参数:
        `beanClass` - the offending bean class
        `msg` - the detail message
        `cause` - the root cause

    - #### BeanInstantiationException

          public BeanInstantiationException(Constructor<?> constructor,
                                            String msg,
                                            @Nullable
                                            Throwable cause)

      Create a new BeanInstantiationException.
      参数:
        `constructor` - the offending constructor
        `msg` - the detail message
        `cause` - the root cause
      从以下版本开始:
        4.3

    - #### BeanInstantiationException

          public BeanInstantiationException(Method constructingMethod,
                                            String msg,
                                            @Nullable
                                            Throwable cause)

      Create a new BeanInstantiationException.
      参数:
        `constructingMethod` - the delegate for bean construction purposes (typically, but not necessarily, a static factory method)
        `msg` - the detail message
        `cause` - the root cause
      从以下版本开始:
        4.3

  - ### 方法详细资料

    - #### getBeanClass

          public Class<?> getBeanClass()

      Return the offending bean class (never `null`).
      返回:
        the class that was to be instantiated

    - #### getConstructor

          @Nullable
          public Constructor<?> getConstructor()

      Return the offending constructor, if known.
      返回:
        the constructor in use, or `null` in case of a factory method or in case of default instantiation
      从以下版本开始:
        4.3

    - #### getConstructingMethod

          @Nullable
          public Method getConstructingMethod()

      Return the delegate for bean construction purposes, if known.
      返回:
        the method in use (typically a static factory method), or `null` in case of constructor-based instantiation
      从以下版本开始:
        4.3