public class BeanCreationException extends FatalBeanException
Constructor and Description |
---|
BeanCreationException(java.lang.String msg)
Create a new BeanCreationException.
|
BeanCreationException(java.lang.String beanName,
java.lang.String msg)
Create a new BeanCreationException.
|
BeanCreationException(java.lang.String resourceDescription,
java.lang.String beanName,
java.lang.String msg)
Create a new BeanCreationException.
|
BeanCreationException(java.lang.String resourceDescription,
java.lang.String beanName,
java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanCreationException.
|
BeanCreationException(java.lang.String beanName,
java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanCreationException.
|
BeanCreationException(java.lang.String msg,
java.lang.Throwable cause)
Create a new BeanCreationException.
|
Modifier and Type | Method and Description |
---|---|
void |
addRelatedCause(java.lang.Throwable ex)
Add a related cause to this bean creation exception,
not being a direct cause of the failure but having occurred
earlier in the creation of the same bean instance.
|
boolean |
contains(java.lang.Class<?> exClass)
Check whether this exception contains an exception of the given type:
either it is of the given class itself or it contains a nested cause
of the given type.
|
java.lang.String |
getBeanName()
Return the name of the bean requested, if any.
|
java.lang.Throwable[] |
getRelatedCauses()
Return the related causes, if any.
|
java.lang.String |
getResourceDescription()
Return the description of the resource that the bean
definition came from, if any.
|
void |
printStackTrace(java.io.PrintStream ps) |
void |
printStackTrace(java.io.PrintWriter pw) |
java.lang.String |
toString() |
equals, hashCode
getMessage, getMostSpecificCause, getRootCause
public BeanCreationException(java.lang.String msg)
msg
- the detail messagepublic BeanCreationException(java.lang.String msg, java.lang.Throwable cause)
msg
- the detail messagecause
- the root causepublic BeanCreationException(java.lang.String beanName, java.lang.String msg)
beanName
- the name of the bean requestedmsg
- the detail messagepublic BeanCreationException(java.lang.String beanName, java.lang.String msg, java.lang.Throwable cause)
beanName
- the name of the bean requestedmsg
- the detail messagecause
- the root causepublic BeanCreationException(java.lang.String resourceDescription, java.lang.String beanName, java.lang.String msg)
resourceDescription
- description of the resource
that the bean definition came frombeanName
- the name of the bean requestedmsg
- the detail messagepublic BeanCreationException(java.lang.String resourceDescription, java.lang.String beanName, java.lang.String msg, java.lang.Throwable cause)
resourceDescription
- description of the resource
that the bean definition came frombeanName
- the name of the bean requestedmsg
- the detail messagecause
- the root causepublic java.lang.String getBeanName()
public java.lang.String getResourceDescription()
public void addRelatedCause(java.lang.Throwable ex)
ex
- the related cause to addpublic java.lang.Throwable[] getRelatedCauses()
null
if nonepublic java.lang.String toString()
toString
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream ps)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter pw)
printStackTrace
in class java.lang.Throwable
public boolean contains(java.lang.Class<?> exClass)
NestedRuntimeException
contains
in class NestedRuntimeException
exClass
- the exception type to look for