T - The generic typepublic abstract class AbstractProviderDefinition<T> extends Object implements BeanDefinition<T>, BeanFactory<T>, BeanDefinitionReference<T>
NAMED_ATTRIBUTECLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Constructor and Description |
|---|
AbstractProviderDefinition() |
| Modifier and Type | Method and Description |
|---|---|
T |
build(BeanResolutionContext resolutionContext,
BeanContext context,
BeanDefinition<T> definition)
Builds a bean instance.
|
protected abstract T |
buildProvider(BeanResolutionContext resolutionContext,
BeanContext context,
Argument<Object> argument,
Qualifier<Object> qualifier,
boolean singleton)
Builds a provider implementation.
|
boolean |
equals(Object o) |
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
String |
getBeanDefinitionName() |
Qualifier<T> |
getDeclaredQualifier()
Resolve the declared qualifier for this bean.
|
List<Argument<?>> |
getTypeArguments()
If the bean itself declares any type arguments this method will return the classes that represent those types.
|
List<Argument<?>> |
getTypeArguments(Class<?> type)
Return the type arguments for the given interface or super type for this bean.
|
int |
hashCode() |
boolean |
isAbstract() |
protected boolean |
isAllowEmptyProviders(BeanContext context)
Return whether missing providers are allowed for this implementation.
|
boolean |
isContainerType()
Checks whether the bean type is a container type.
|
boolean |
isEnabled(BeanContext context,
BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.
|
boolean |
isPresent() |
boolean |
isSingleton() |
BeanDefinition<T> |
load()
Loads the bean definition.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitasArgument, findMethod, findPossibleMethods, getBeanType, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, inject, inject, isCandidateBean, isIterable, isProvided, isProxy, resolveDynamicQualifierbooleanValue, 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, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, 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, synthesizeDeclaredAnnotationsByTypegetAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresentbuildisConfigurationProperties, isContextScope, loadgetExposedTypes, isPrimary, requiresMethodProcessingisEnabledpublic boolean isContainerType()
BeanTypeisContainerType in interface BeanType<T>Iterable.public boolean isEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext)
BeanContextConditionalisEnabled in interface BeanContextConditionalcontext - The contextresolutionContext - The bean resolution contextpublic String getBeanDefinitionName()
getBeanDefinitionName in interface BeanDefinitionReference<T>BeanDefinitionpublic BeanDefinition<T> load()
BeanDefinitionReferenceload in interface BeanDefinitionReference<T>public boolean isPresent()
isPresent in interface BeanDefinitionReference<T>@NonNull protected abstract T buildProvider(@NonNull BeanResolutionContext resolutionContext, @NonNull BeanContext context, @NonNull Argument<Object> argument, @Nullable Qualifier<Object> qualifier, boolean singleton)
resolutionContext - The resolution contextcontext - The contextargument - The argumentqualifier - The qualifiersingleton - Whether the bean is a singletonpublic T build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException
BeanFactorybuild in interface BeanFactory<T>resolutionContext - The bean resolution contextcontext - The contextdefinition - The definitionBeanInstantiationException - if the instance could not be instantiatedprotected boolean isAllowEmptyProviders(BeanContext context)
false a NoSuchBeanException is thrown.context - The contexttrue if missing providers are allowedpublic final boolean isAbstract()
isAbstract in interface BeanDefinition<T>public final boolean isSingleton()
isSingleton in interface BeanDefinition<T>isSingleton in interface BeanDefinitionReference<T>@NonNull public final List<Argument<?>> getTypeArguments(Class<?> type)
BeanDefinitiongetTypeArguments in interface BeanDefinition<T>type - The super class or interface type@NonNull public final List<Argument<?>> getTypeArguments()
BeanDefinitiongetTypeArguments in interface BeanDefinition<T>public AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProviderAnnotationMetadata.EMPTY_METADATA.getAnnotationMetadata in interface AnnotationMetadataProviderAnnotationMetadatapublic Qualifier<T> getDeclaredQualifier()
BeanDefinitiongetDeclaredQualifier in interface BeanDefinition<T>