Package io.micronaut.inject.provider
Class BeanProviderDefinition
java.lang.Object
io.micronaut.inject.provider.AbstractProviderDefinition<BeanProvider<Object>>
io.micronaut.inject.provider.BeanProviderDefinition
- All Implemented Interfaces:
- AnnotationMetadata,- AnnotationMetadataDelegate,- AnnotationMetadataProvider,- AnnotationSource,- BeanInfo<BeanProvider<Object>>,- Named,- Ordered,- ArgumentCoercible<BeanProvider<Object>>,- BeanContextConditional,- BeanDefinition<BeanProvider<Object>>,- BeanDefinitionReference<BeanProvider<Object>>,- BeanType<BeanProvider<Object>>,- InstantiatableBeanDefinition<BeanProvider<Object>>,- QualifiedBeanType<BeanProvider<Object>>
@Internal
public final class BeanProviderDefinition
extends AbstractProviderDefinition<BeanProvider<Object>>
Implementation for 
BeanProvider bean lookups.- Since:
- 3.0.0
- Author:
- graemerocher
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationMetadataCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTYFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected BeanProvider<Object>buildProvider(@NonNull BeanResolutionContext resolutionContext, @NonNull BeanContext context, @NonNull Argument<Object> argument, @Nullable Qualifier<Object> qualifier, boolean singleton) Builds a provider implementation.Returns the bean type.protected booleanisAllowEmptyProviders(BeanContext context) Return whether missing providers are allowed for this implementation.booleanisEnabled(BeanContext context, BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.booleanMethods inherited from class io.micronaut.inject.provider.AbstractProviderDefinitionequals, getAnnotationMetadata, getBeanDefinitionName, getDeclaredQualifier, getTypeArguments, getTypeArguments, hashCode, instantiate, isAbstract, isCandidateBean, isConfigurationProperties, isContainerType, isSingleton, loadMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataenumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegatebooleanValue, 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.inject.BeanContextConditionalisEnabledMethods inherited from interface io.micronaut.inject.BeanDefinitionasArgument, findMethod, findPossibleMethods, getBeanDescription, getBeanDescription, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getGenericBeanType, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeInformation, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isIterable, isProxy, resolveDynamicQualifierMethods inherited from interface io.micronaut.inject.BeanDefinitionReferenceisContextScope, isProxiedBean, isProxyTarget, loadMethods inherited from interface io.micronaut.inject.BeanTypegetBeanName, getExposedTypes, isPrimary, requiresMethodProcessingMethods inherited from interface io.micronaut.inject.InstantiatableBeanDefinitioninstantiate
- 
Constructor Details- 
BeanProviderDefinitionpublic BeanProviderDefinition()
 
- 
- 
Method Details- 
isEnabledDescription copied from interface:BeanContextConditionalReturn whether this component is enabled for the given context.- Specified by:
- isEnabledin interface- BeanContextConditional
- Overrides:
- isEnabledin class- AbstractProviderDefinition<BeanProvider<Object>>
- Parameters:
- context- The context
- resolutionContext- The bean resolution context
- Returns:
- True if it is
 
- 
getBeanTypeDescription copied from interface:BeanTypeReturns the bean type.- Returns:
- The produced bean type
 
- 
isPresentpublic boolean isPresent()- Specified by:
- isPresentin interface- BeanDefinitionReference<BeanProvider<Object>>
- Overrides:
- isPresentin class- AbstractProviderDefinition<BeanProvider<Object>>
- Returns:
- Is the underlying bean type present on the classpath
 
- 
buildProviderprotected BeanProvider<Object> buildProvider(@NonNull @NonNull BeanResolutionContext resolutionContext, @NonNull @NonNull BeanContext context, @NonNull @NonNull Argument<Object> argument, @Nullable @Nullable Qualifier<Object> qualifier, boolean singleton) Description copied from class:AbstractProviderDefinitionBuilds a provider implementation.- Specified by:
- buildProviderin class- AbstractProviderDefinition<BeanProvider<Object>>
- Parameters:
- resolutionContext- The resolution context
- context- The context
- argument- The argument
- qualifier- The qualifier
- singleton- Whether the bean is a singleton
- Returns:
- The provider
 
- 
isAllowEmptyProvidersDescription copied from class:AbstractProviderDefinitionReturn whether missing providers are allowed for this implementation. IffalseaNoSuchBeanExceptionis thrown.- Overrides:
- isAllowEmptyProvidersin class- AbstractProviderDefinition<BeanProvider<Object>>
- Parameters:
- context- The context
- Returns:
- Returns trueif missing providers are allowed
 
 
-