T
- The Bean definition type@Internal public abstract class AbstractParametrizedBeanDefinition<T> extends AbstractBeanDefinition<T> implements ParametrizedBeanFactory<T>
BeanDefinition
that is a ParametrizedBeanFactory
.executableMethodMap, fieldInjectionPoints, methodInjectionPoints, postConstructMethods, preDestroyMethods
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier | Constructor and Description |
---|---|
protected |
AbstractParametrizedBeanDefinition(Class<T> type,
AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Argument... arguments) |
|
AbstractParametrizedBeanDefinition(Class<T> producedType,
Class<?> declaringType,
String methodName,
AnnotationMetadata methodMetadata,
boolean requiresReflection,
Argument... arguments) |
Modifier and Type | Method and Description |
---|---|
T |
build(BeanResolutionContext resolutionContext,
BeanContext context,
BeanDefinition<T> definition,
Map<String,Object> requiredArgumentValues)
Variation of the
BeanFactory.build(BeanContext, BeanDefinition) method that allows passing the values necessary for
successful bean construction. |
protected abstract T |
doBuild(BeanResolutionContext resolutionContext,
BeanContext context,
BeanDefinition<T> definition,
Map<String,Object> requiredArgumentValues) |
Argument<?>[] |
getRequiredArguments() |
boolean |
isEnabled(BeanContext context,
BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.
|
addExecutableMethod, addInjectionPoint, addInjectionPoint, addPostConstruct, addPreDestroy, configure, containsProperties, containsProperties, containsValueForField, containsValueForMethodArgument, equals, findBeanForConstructorArgument, findBeanForField, findBeanForMethodArgument, findMethod, findPossibleMethods, getAnnotationMetadata, getBeanForConstructorArgument, getBeanForField, getBeanForField, getBeanForMethodArgument, getBeanRegistrationForConstructorArgument, getBeanRegistrationForField, getBeanRegistrationForMethodArgument, getBeanRegistrationsForConstructorArgument, getBeanRegistrationsForField, getBeanRegistrationsForMethodArgument, getBeansOfTypeForConstructorArgument, getBeansOfTypeForConstructorArgument, getBeansOfTypeForField, getBeansOfTypeForField, getBeansOfTypeForMethodArgument, getBeansOfTypeForMethodArgument, getBeanType, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getExposedTypes, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getProxiedBean, getRequiredComponents, getScope, getScopeName, getStreamOfTypeForField, getTypeArguments, getTypeArgumentsMap, getValueForConstructorArgument, getValueForField, getValueForMethodArgument, getValueForPath, getValueForPath, hashCode, hasPropertyExpressions, inject, inject, injectAnother, injectBean, injectBeanField, injectBeanMethod, isAbstract, isIterable, isPrimary, isProvided, postConstruct, preDestroy, resolveAnnotationMetadata, streamOfTypeForConstructorArgument, streamOfTypeForMethodArgument, toString, warn, warnMissingProperty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
build
build
asArgument, getDeclaredQualifier, getRequiredMethod, getTypeArguments, getTypeArguments, getTypeParameters, getTypeParameters, isCandidateBean, isProxy, isSingleton, 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, 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, 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, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
isContainerType, requiresMethodProcessing
isEnabled, isEnabled
public AbstractParametrizedBeanDefinition(Class<T> producedType, Class<?> declaringType, String methodName, AnnotationMetadata methodMetadata, boolean requiresReflection, Argument... arguments)
producedType
- The produced typedeclaringType
- The declaring typemethodName
- The method namemethodMetadata
- The method metadatarequiresReflection
- Whether requires refectionarguments
- The argumentsprotected AbstractParametrizedBeanDefinition(Class<T> type, AnnotationMetadata annotationMetadata, boolean requiresReflection, Argument... arguments)
type
- The typeannotationMetadata
- The annotation metadatarequiresReflection
- Whether requires reflectionarguments
- The argumentspublic Argument<?>[] getRequiredArguments()
getRequiredArguments
in interface ParametrizedBeanFactory<T>
public final T build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition, Map<String,Object> requiredArgumentValues) throws BeanInstantiationException
ParametrizedBeanFactory
BeanFactory.build(BeanContext, BeanDefinition)
method that allows passing the values necessary for
successful bean construction.build
in interface ParametrizedBeanFactory<T>
resolutionContext
- The BeanResolutionContext
context
- The BeanContext
definition
- The BeanDefinition
requiredArgumentValues
- The required arguments values. The keys should match the names of the arguments
returned by ParametrizedBeanFactory.getRequiredArguments()
BeanInstantiationException
- If the bean cannot be instantiated for the arguments suppliedprotected abstract T doBuild(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition, Map<String,Object> requiredArgumentValues)
resolutionContext
- The resolution contextcontext
- The bean contextdefinition
- The bean definitionrequiredArgumentValues
- The required argumentspublic boolean isEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext)
BeanContextConditional
isEnabled
in interface BeanContextConditional
context
- The contextresolutionContext
- The bean resolution context