Package io.micronaut.context.exceptions
Class DependencyInjectionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.micronaut.context.exceptions.BeanContextException
-
- io.micronaut.context.exceptions.BeanCreationException
-
- io.micronaut.context.exceptions.DependencyInjectionException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CircularDependencyException
public class DependencyInjectionException extends BeanCreationException
Represents a runtime failure to perform dependency injection.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.convert.ArgumentConversionContext argumentConversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a argument.DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.String message)
protected
DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String methodName, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.String message)
protected
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.String message)
protected
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String fieldName, java.lang.String message, boolean circular)
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.String message, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message)
protected
DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message, boolean circular)
DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.String message)
protected
DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.String message)
DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.String message, java.lang.Throwable cause)
DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DependencyInjectionException
missingProperty(BeanResolutionContext resolutionContext, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.-
Methods inherited from class io.micronaut.context.exceptions.BeanCreationException
getRootBeanType
-
-
-
-
Constructor Detail
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextcause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextargument
- The argumentcause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.String message, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextmessage
- The messagecause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextmessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextargument
- The argumentmessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextfieldInjectionPoint
- The field injection pointcause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextdeclaringBean
- The declaring typefieldName
- The field namecause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextfieldInjectionPoint
- The field injection pointmessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextdeclaringBean
- The declaring beanfieldName
- The field namemessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextfieldInjectionPoint
- The field injection pointmessage
- The messagecause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String fieldName, java.lang.String message, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextdeclaringBean
- The declaring beanfieldName
- The field namemessage
- The messagecause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextmethodInjectionPoint
- The method injection pointargument
- The argumentcause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.Throwable cause)
- Parameters:
resolutionContext
- The resolution contextdeclaringType
- The declaring typemethodName
- The method nameargument
- The argumentcause
- The throwable
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextmethodInjectionPoint
- The method injection pointargument
- The argumentmessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.String message)
- Parameters:
resolutionContext
- The resolution contextdeclaringType
- The declaring typemethodName
- The method nameargument
- The argumentmessage
- The message
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.convert.ArgumentConversionContext argumentConversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a argument.- Parameters:
resolutionContext
- The resolution contextargumentConversionContext
- The argument conversion contextproperty
- The property being resolved
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.- Parameters:
resolutionContext
- The resolution contextmethodInjectionPoint
- The method injection pointconversionContext
- The conversion contextproperty
- The property being resolved
-
DependencyInjectionException
public DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringBean, java.lang.String methodName, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.- Parameters:
resolutionContext
- The resolution contextdeclaringBean
- The declaring beanmethodName
- The method nameconversionContext
- The conversion contextproperty
- The property being resolved
-
DependencyInjectionException
protected DependencyInjectionException(BeanResolutionContext resolutionContext, MethodInjectionPoint methodInjectionPoint, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
- Parameters:
resolutionContext
- The resolution contextmethodInjectionPoint
- The method injection pointargument
- The argumentmessage
- The messagecircular
- Is the path circular
-
DependencyInjectionException
protected DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String methodName, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
- Parameters:
resolutionContext
- The resolution contextdeclaringType
- The method declaring typemethodName
- The method nameargument
- The argumentmessage
- The messagecircular
- Is the path circular
-
DependencyInjectionException
protected DependencyInjectionException(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, java.lang.String message, boolean circular)
- Parameters:
resolutionContext
- The resolution contextfieldInjectionPoint
- The field injection pointmessage
- The messagecircular
- Is the path circular
-
DependencyInjectionException
protected DependencyInjectionException(BeanResolutionContext resolutionContext, BeanDefinition declaringType, java.lang.String fieldName, java.lang.String message, boolean circular)
- Parameters:
resolutionContext
- The resolution contextdeclaringType
- The field declaringTypefieldName
- The field namemessage
- The messagecircular
- Is the path circular
-
DependencyInjectionException
protected DependencyInjectionException(BeanResolutionContext resolutionContext, io.micronaut.core.type.Argument argument, java.lang.String message, boolean circular)
- Parameters:
resolutionContext
- The resolution contextargument
- The argumentmessage
- The messagecircular
- Is the path circular
-
-
Method Detail
-
missingProperty
public static DependencyInjectionException missingProperty(BeanResolutionContext resolutionContext, io.micronaut.core.convert.ArgumentConversionContext conversionContext, java.lang.String property)
Builds an error message for attempted argument conversion on a method.- Parameters:
resolutionContext
- The resolution contextconversionContext
- The conversion contextproperty
- The property being resolved- Returns:
- new instance of
DependencyInjectionException
-
-