@Internal public final class BeanProviderDefinition extends AbstractProviderDefinition<BeanProvider<Object>>
BeanProvider
bean lookups.NAMED_ATTRIBUTE
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Constructor and Description |
---|
BeanProviderDefinition() |
Modifier and Type | Method and Description |
---|---|
protected BeanProvider<Object> |
buildProvider(BeanResolutionContext resolutionContext,
BeanContext context,
Argument<Object> argument,
Qualifier<Object> qualifier,
boolean singleton)
Builds a provider implementation.
|
Class<BeanProvider<Object>> |
getBeanType()
Returns the bean type.
|
protected boolean |
isAllowEmptyProviders(BeanContext context)
Return whether missing providers are allowed for this implementation.
|
boolean |
isEnabled(BeanContext context,
BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.
|
boolean |
isPresent() |
build, equals, getAnnotationMetadata, getBeanDefinitionName, getDeclaredQualifier, getTypeArguments, getTypeArguments, hashCode, isAbstract, isContainerType, isSingleton, load
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
asArgument, findMethod, findPossibleMethods, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, inject, inject, isCandidateBean, isIterable, isProvided, isProxy, resolveDynamicQualifier
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, 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, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, 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
getAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
build
isConfigurationProperties, isContextScope, load
getExposedTypes, isPrimary, requiresMethodProcessing
isEnabled
public boolean isEnabled(BeanContext context, BeanResolutionContext resolutionContext)
BeanContextConditional
isEnabled
in interface BeanContextConditional
isEnabled
in class AbstractProviderDefinition<BeanProvider<Object>>
context
- The contextresolutionContext
- The bean resolution contextpublic Class<BeanProvider<Object>> getBeanType()
BeanType
public boolean isPresent()
isPresent
in interface BeanDefinitionReference<BeanProvider<Object>>
isPresent
in class AbstractProviderDefinition<BeanProvider<Object>>
protected BeanProvider<Object> buildProvider(@NonNull BeanResolutionContext resolutionContext, @NonNull BeanContext context, @NonNull Argument<Object> argument, @Nullable Qualifier<Object> qualifier, boolean singleton)
AbstractProviderDefinition
buildProvider
in class AbstractProviderDefinition<BeanProvider<Object>>
resolutionContext
- The resolution contextcontext
- The contextargument
- The argumentqualifier
- The qualifiersingleton
- Whether the bean is a singletonprotected boolean isAllowEmptyProviders(BeanContext context)
AbstractProviderDefinition
false
a NoSuchBeanException
is thrown.isAllowEmptyProviders
in class AbstractProviderDefinition<BeanProvider<Object>>
context
- The contexttrue
if missing providers are allowed