Class AbstractBeanConstructor<T>
java.lang.Object
io.micronaut.core.beans.AbstractBeanConstructor<T>
- Type Parameters:
T- The bean type
- All Implemented Interfaces:
AnnotationMetadataProvider, AnnotationSource, BeanConstructor<T>, Described
- Direct Known Subclasses:
AbstractBeanDefinitionBeanConstructor
@Deprecated(since="5.0",
forRemoval=true)
public abstract class AbstractBeanConstructor<T>
extends Object
implements BeanConstructor<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Abstract implementation of the
BeanConstructor interface.- Since:
- 3.0.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBeanConstructor(Class<T> beanType, AnnotationMetadata annotationMetadata, Argument<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Supplies the metadata.Argument<?>[]Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the bean type.@Nullable Constructor<T> Deprecated, for removal: This API element is subject to removal in a future version.Returns theConstructorthis bean constructor stands for: the constructor ofBeanConstructor.getDeclaringBeanType()whose parameter types are the raw types ofBeanConstructor.getArguments().Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface BeanConstructor
getDescription, getDescription, instantiate
-
Constructor Details
-
AbstractBeanConstructor
protected AbstractBeanConstructor(Class<T> beanType, AnnotationMetadata annotationMetadata, Argument<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Default constructor.- Parameters:
beanType- The bean typeannotationMetadata- The annotation metadataarguments- The arguments
-
-
Method Details
-
getAnnotationMetadata
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
getDeclaringBeanType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanConstructorReturns the bean type.- Specified by:
getDeclaringBeanTypein interfaceBeanConstructor<T>- Returns:
- The underlying bean type
-
getArguments
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getArgumentsin interfaceBeanConstructor<T>- Returns:
- The constructor argument types.
-
getTargetConstructor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanConstructorReturns theConstructorthis bean constructor stands for: the constructor ofBeanConstructor.getDeclaringBeanType()whose parameter types are the raw types ofBeanConstructor.getArguments().This is the counterpart of
io.micronaut.inject.MethodReference#getTargetMethod()for constructors. Framework implementations resolve the constructor once and hold it; this default resolves it on every call, so an implementation that knows its constructor should return it directly.The result is
nullwhen the bean is not created through a constructor of the declaring bean type: a bean produced by a factory method or field, or an introspection instantiating through a static creator method, even one whose parameter types a declared constructor shares.- Specified by:
getTargetConstructorin interfaceBeanConstructor<T>- Returns:
- The constructor, or
nullif the declaring bean type declares no such constructor
-
BeanConstructorif needed