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.
No longer needed, user should have a custom implementation of BeanConstructor if needed
Abstract implementation of the BeanConstructor interface.
Since:
3.0.0
Author:
graemerocher
  • 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 type
      annotationMetadata - The annotation metadata
      arguments - The arguments
  • Method Details

    • getAnnotationMetadata

      public AnnotationMetadata getAnnotationMetadata()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: AnnotationMetadataProvider
      Supplies the metadata. Defaults to AnnotationMetadata.EMPTY_METADATA.
      Specified by:
      getAnnotationMetadata in interface AnnotationMetadataProvider
      Returns:
      The AnnotationMetadata
    • getDeclaringBeanType

      public Class<T> getDeclaringBeanType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: BeanConstructor
      Returns the bean type.
      Specified by:
      getDeclaringBeanType in interface BeanConstructor<T>
      Returns:
      The underlying bean type
    • getArguments

      public Argument<?>[] getArguments()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getArguments in interface BeanConstructor<T>
      Returns:
      The constructor argument types.
    • getTargetConstructor

      public @Nullable Constructor<T> getTargetConstructor()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: BeanConstructor
      Returns the Constructor this bean constructor stands for: the constructor of BeanConstructor.getDeclaringBeanType() whose parameter types are the raw types of BeanConstructor.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 null when 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:
      getTargetConstructor in interface BeanConstructor<T>
      Returns:
      The constructor, or null if the declaring bean type declares no such constructor