Package io.micronaut.context.exceptions
Class BeanCreationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.micronaut.context.exceptions.BeanContextException
-
- io.micronaut.context.exceptions.BeanCreationException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BeanInstantiationException
,DependencyInjectionException
public abstract class BeanCreationException extends BeanContextException
A base class for exceptions that occurred during bean creation.- Since:
- 2.0.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BeanCreationException(BeanResolutionContext resolutionContext, java.lang.String message)
protected
BeanCreationException(BeanResolutionContext resolutionContext, java.lang.String message, java.lang.Throwable cause)
protected
BeanCreationException(BeanType<T> beanDefinition, java.lang.String message)
protected
BeanCreationException(BeanType<T> beanDefinition, java.lang.String message, java.lang.Throwable cause)
protected
BeanCreationException(java.lang.String message)
protected
BeanCreationException(java.lang.String message, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<BeanType>
getRootBeanType()
-
-
-
Constructor Detail
-
BeanCreationException
protected BeanCreationException(java.lang.String message, java.lang.Throwable cause)
- Parameters:
message
- The messagecause
- The throwable
-
BeanCreationException
protected BeanCreationException(java.lang.String message)
- Parameters:
message
- The message
-
BeanCreationException
protected BeanCreationException(BeanResolutionContext resolutionContext, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextmessage
- The message
-
BeanCreationException
protected BeanCreationException(BeanResolutionContext resolutionContext, java.lang.String message, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextmessage
- The messagecause
- The throwable
-
BeanCreationException
protected BeanCreationException(BeanType<T> beanDefinition, java.lang.String message, java.lang.Throwable cause)
- Type Parameters:
T
- The bean type- Parameters:
beanDefinition
- The bean definitionmessage
- The messagecause
- The throwable
-
BeanCreationException
protected BeanCreationException(BeanType<T> beanDefinition, java.lang.String message)
- Type Parameters:
T
- The bean type- Parameters:
beanDefinition
- The bean definitionmessage
- The message
-
-
Method Detail
-
getRootBeanType
public java.util.Optional<BeanType> getRootBeanType()
- Returns:
- The reference to the root bean.
-
-