public class BeanInstantiationException extends FatalBeanException
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
beanClass |
private java.lang.reflect.Method |
constructingMethod |
private java.lang.reflect.Constructor<?> |
constructor |
Constructor and Description |
---|
BeanInstantiationException(java.lang.Class<?> beanClass,
java.lang.String msg)
Create a new BeanInstantiationException.
|
BeanInstantiationException(java.lang.Class<?> beanClass,
java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanInstantiationException.
|
BeanInstantiationException(java.lang.reflect.Constructor<?> constructor,
java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanInstantiationException.
|
BeanInstantiationException(java.lang.reflect.Method constructingMethod,
java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanInstantiationException.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getBeanClass()
Return the offending bean class (never
null ). |
java.lang.reflect.Method |
getConstructingMethod()
Return the delegate for bean construction purposes, if known.
|
java.lang.reflect.Constructor<?> |
getConstructor()
Return the offending constructor, if known.
|
contains, getMessage, getMostSpecificCause, getRootCause
private java.lang.Class<?> beanClass
private java.lang.reflect.Constructor<?> constructor
private java.lang.reflect.Method constructingMethod
public BeanInstantiationException(java.lang.Class<?> beanClass, java.lang.String msg)
beanClass
- the offending bean classmsg
- the detail messagepublic BeanInstantiationException(java.lang.Class<?> beanClass, java.lang.String msg, @Nullable java.lang.Throwable cause)
beanClass
- the offending bean classmsg
- the detail messagecause
- the root causepublic BeanInstantiationException(java.lang.reflect.Constructor<?> constructor, java.lang.String msg, @Nullable java.lang.Throwable cause)
constructor
- the offending constructormsg
- the detail messagecause
- the root causepublic BeanInstantiationException(java.lang.reflect.Method constructingMethod, java.lang.String msg, @Nullable java.lang.Throwable cause)
constructingMethod
- the delegate for bean construction purposes
(typically, but not necessarily, a static factory method)msg
- the detail messagecause
- the root causepublic java.lang.Class<?> getBeanClass()
null
).@Nullable public java.lang.reflect.Constructor<?> getConstructor()
null
in case of a
factory method or in case of default instantiation@Nullable public java.lang.reflect.Method getConstructingMethod()
null
in case of constructor-based instantiation