T
- The bean definition typepublic interface DelegatingBeanDefinition<T> extends BeanDefinition<T>
BeanDefinition
with another that delegates and potentially decorates the
BeanDefinition
instance.NAMED_ATTRIBUTE
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
default <R> java.util.Optional<ExecutableMethod<T,R>> |
findMethod(java.lang.String name,
java.lang.Class... argumentTypes)
Finds a single
ExecutableMethod for the given name and argument types. |
default <R> java.util.stream.Stream<ExecutableMethod<T,R>> |
findPossibleMethods(java.lang.String name)
Finds possible methods for the given method name.
|
default AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
default java.lang.Class<T> |
getBeanType()
Returns the bean type.
|
default ConstructorInjectionPoint<T> |
getConstructor()
The single concrete constructor that is an injection point for creating the bean.
|
default java.util.Optional<java.lang.Class<?>> |
getDeclaringType() |
default java.util.Collection<ExecutableMethod<T,?>> |
getExecutableMethods() |
default java.util.Collection<FieldInjectionPoint> |
getInjectedFields()
All the fields that require injection.
|
default java.util.Collection<MethodInjectionPoint> |
getInjectedMethods()
All methods that require injection.
|
default java.lang.String |
getName() |
default java.util.Collection<MethodInjectionPoint> |
getPostConstructMethods()
All the methods that should be called once the bean has been fully initialized and constructed.
|
default java.util.Collection<MethodInjectionPoint> |
getPreDestroyMethods()
All the methods that should be called when the object is to be destroyed.
|
default java.util.Collection<java.lang.Class> |
getRequiredComponents() |
default <R> ExecutableMethod<T,R> |
getRequiredMethod(java.lang.String name,
java.lang.Class... argumentTypes)
Finds a single
ExecutableMethod for the given name and argument types. |
default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getScope() |
BeanDefinition<T> |
getTarget() |
default java.util.List<Argument<?>> |
getTypeArguments(java.lang.String type)
Return the type arguments for the given interface or super type for this bean.
|
default T |
inject(BeanContext context,
T bean)
Inject the given bean with the context.
|
default T |
inject(BeanResolutionContext resolutionContext,
BeanContext context,
T bean)
Inject the given bean with the context.
|
default boolean |
isAbstract() |
default boolean |
isEnabled(BeanContext context)
Return whether this component is enabled for the given context.
|
default boolean |
isEnabled(BeanContext context,
BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.
|
default boolean |
isIterable() |
default boolean |
isPrimary() |
default boolean |
isProvided() |
default boolean |
isSingleton() |
default boolean |
requiresMethodProcessing()
By default, when the
BeanContext is started, the
BeanDefinition.getExecutableMethods() are not processed by registered
ExecutableMethodProcessor instances unless this method returns true. |
getDeclaredQualifier, getTypeArguments, getTypeArguments, getTypeParameters, getTypeParameters, 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, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, 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, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
BeanDefinition<T> getTarget()
default boolean requiresMethodProcessing()
BeanType
BeanContext
is started, the
BeanDefinition.getExecutableMethods()
are not processed by registered
ExecutableMethodProcessor
instances unless this method returns true.requiresMethodProcessing
in interface BeanType<T>
Executable.processOnStartup()
default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getScope()
getScope
in interface BeanDefinition<T>
default AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProvider
AnnotationMetadata.EMPTY_METADATA
.getAnnotationMetadata
in interface AnnotationMetadataProvider
AnnotationMetadata
default <R> ExecutableMethod<T,R> getRequiredMethod(java.lang.String name, java.lang.Class... argumentTypes)
BeanDefinition
ExecutableMethod
for the given name and argument types.getRequiredMethod
in interface BeanDefinition<T>
R
- The return typename
- The method nameargumentTypes
- The argument typesExecutableMethod
default boolean isAbstract()
isAbstract
in interface BeanDefinition<T>
default boolean isSingleton()
isSingleton
in interface BeanDefinition<T>
default boolean isProvided()
isProvided
in interface BeanDefinition<T>
default boolean isIterable()
isIterable
in interface BeanDefinition<T>
EachProperty
or
EachBean
default java.lang.Class<T> getBeanType()
BeanType
getBeanType
in interface BeanDefinition<T>
getBeanType
in interface BeanType<T>
default ConstructorInjectionPoint<T> getConstructor()
BeanDefinition
getConstructor
in interface BeanDefinition<T>
default java.util.Collection<java.lang.Class> getRequiredComponents()
getRequiredComponents
in interface BeanDefinition<T>
default java.util.Collection<MethodInjectionPoint> getInjectedMethods()
BeanDefinition
getInjectedMethods
in interface BeanDefinition<T>
default java.util.Collection<FieldInjectionPoint> getInjectedFields()
BeanDefinition
getInjectedFields
in interface BeanDefinition<T>
default java.util.Collection<MethodInjectionPoint> getPostConstructMethods()
BeanDefinition
getPostConstructMethods
in interface BeanDefinition<T>
default java.util.Collection<MethodInjectionPoint> getPreDestroyMethods()
BeanDefinition
getPreDestroyMethods
in interface BeanDefinition<T>
default java.lang.String getName()
default <R> java.util.Optional<ExecutableMethod<T,R>> findMethod(java.lang.String name, java.lang.Class... argumentTypes)
BeanDefinition
ExecutableMethod
for the given name and argument types.findMethod
in interface BeanDefinition<T>
R
- The return typename
- The method nameargumentTypes
- The argument typesExecutableMethod
default <R> java.util.stream.Stream<ExecutableMethod<T,R>> findPossibleMethods(java.lang.String name)
BeanDefinition
findPossibleMethods
in interface BeanDefinition<T>
R
- The return typename
- The method namedefault T inject(BeanContext context, T bean)
BeanDefinition
inject
in interface BeanDefinition<T>
context
- The contextbean
- The beandefault T inject(BeanResolutionContext resolutionContext, BeanContext context, T bean)
BeanDefinition
inject
in interface BeanDefinition<T>
resolutionContext
- the resolution contextcontext
- The contextbean
- The beandefault java.util.Collection<ExecutableMethod<T,?>> getExecutableMethods()
getExecutableMethods
in interface BeanDefinition<T>
ExecutableMethod
instances for this definitiondefault boolean isPrimary()
default boolean isEnabled(BeanContext context)
BeanContextConditional
isEnabled
in interface BeanContextConditional
context
- The contextdefault boolean isEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext)
BeanContextConditional
isEnabled
in interface BeanContextConditional
context
- The contextresolutionContext
- The bean resolution contextdefault java.util.Optional<java.lang.Class<?>> getDeclaringType()
getDeclaringType
in interface BeanDefinition<T>
@NonNull default java.util.List<Argument<?>> getTypeArguments(java.lang.String type)
BeanDefinition
getTypeArguments
in interface BeanDefinition<T>
type
- The super class or interface type