Class ObjectProviderBeanDefinition

java.lang.Object
io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>
io.micronaut.spring.beans.ObjectProviderBeanDefinition
All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadata, io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.beans.BeanInfo<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.core.naming.Named, io.micronaut.core.type.ArgumentCoercible<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.inject.BeanContextConditional, io.micronaut.inject.BeanDefinition<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.inject.BeanDefinitionReference<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.inject.BeanType<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.inject.InstantiatableBeanDefinition<org.springframework.beans.factory.ObjectProvider<Object>>, io.micronaut.inject.QualifiedBeanType<org.springframework.beans.factory.ObjectProvider<Object>>

@Internal public final class ObjectProviderBeanDefinition extends io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>
Implements support for Spring's ObjectProvider interface.
Since:
4.3.0
Author:
graemerocher
  • Field Summary

    Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER

    Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.beans.factory.ObjectProvider<Object>
    buildProvider(@NonNull io.micronaut.context.BeanResolutionContext resolutionContext, @NonNull io.micronaut.context.BeanContext context, @NonNull io.micronaut.core.type.Argument<Object> argument, @Nullable io.micronaut.context.Qualifier<Object> qualifier, boolean singleton)
     
    Class<org.springframework.beans.factory.ObjectProvider<Object>>
     
    protected boolean
    isAllowEmptyProviders(io.micronaut.context.BeanContext context)
     
    boolean
    isEnabled(io.micronaut.context.BeanContext context, io.micronaut.context.BeanResolutionContext resolutionContext)
     
    boolean
     

    Methods inherited from class io.micronaut.inject.provider.AbstractProviderDefinition

    equals, getAnnotationMetadata, getBeanDefinitionName, getDeclaredQualifier, getTypeArguments, getTypeArguments, hashCode, instantiate, isAbstract, isCandidateBean, isConfigurationProperties, isContainerType, isSingleton, load

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

    booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType

    Methods inherited from interface io.micronaut.inject.BeanContextConditional

    isEnabled

    Methods inherited from interface io.micronaut.inject.BeanDefinition

    asArgument, findMethod, findPossibleMethods, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getGenericBeanType, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isIterable, isProxy, resolveDynamicQualifier

    Methods inherited from interface io.micronaut.inject.BeanDefinitionReference

    isContextScope, isProxiedBean, isProxyTarget, load

    Methods inherited from interface io.micronaut.inject.BeanType

    getBeanName, getExposedTypes, isPrimary, requiresMethodProcessing

    Methods inherited from interface io.micronaut.inject.InstantiatableBeanDefinition

    instantiate
  • Constructor Details

    • ObjectProviderBeanDefinition

      public ObjectProviderBeanDefinition()
  • Method Details

    • isEnabled

      public boolean isEnabled(io.micronaut.context.BeanContext context, io.micronaut.context.BeanResolutionContext resolutionContext)
      Specified by:
      isEnabled in interface io.micronaut.inject.BeanContextConditional
      Overrides:
      isEnabled in class io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>
    • getBeanType

      public Class<org.springframework.beans.factory.ObjectProvider<Object>> getBeanType()
    • isPresent

      public boolean isPresent()
      Specified by:
      isPresent in interface io.micronaut.inject.BeanDefinitionReference<org.springframework.beans.factory.ObjectProvider<Object>>
      Overrides:
      isPresent in class io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>
    • buildProvider

      protected org.springframework.beans.factory.ObjectProvider<Object> buildProvider(@NonNull @NonNull io.micronaut.context.BeanResolutionContext resolutionContext, @NonNull @NonNull io.micronaut.context.BeanContext context, @NonNull @NonNull io.micronaut.core.type.Argument<Object> argument, @Nullable @Nullable io.micronaut.context.Qualifier<Object> qualifier, boolean singleton)
      Specified by:
      buildProvider in class io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>
    • isAllowEmptyProviders

      protected boolean isAllowEmptyProviders(io.micronaut.context.BeanContext context)
      Overrides:
      isAllowEmptyProviders in class io.micronaut.inject.provider.AbstractProviderDefinition<org.springframework.beans.factory.ObjectProvider<Object>>