T - The bean typepublic interface BeanDefinition<T> extends AnnotationMetadataDelegate, Named, BeanType<T>, ArgumentCoercible<T>
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
NAMED_ATTRIBUTE
Attribute used to store a dynamic bean name. 
 | 
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description | 
|---|---|
default Argument<T> | 
asArgument()  | 
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. 
 | 
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<Argument<?>> | 
getContainerElement()
If  
BeanType.isContainerType() returns true this will return the container element. | 
default Qualifier<T> | 
getDeclaredQualifier()
Resolve the declared qualifier for this bean. 
 | 
default java.util.Optional<java.lang.Class<?>> | 
getDeclaringType()  | 
default java.util.Collection<ExecutableMethod<T,?>> | 
getExecutableMethods()  | 
default java.util.Collection<FieldInjectionPoint<T,?>> | 
getInjectedFields()
All the fields that require injection. 
 | 
default java.util.Collection<MethodInjectionPoint<T,?>> | 
getInjectedMethods()
All methods that require injection. 
 | 
default java.lang.String | 
getName()  | 
default java.util.Collection<MethodInjectionPoint<T,?>> | 
getPostConstructMethods()
All the methods that should be called once the bean has been fully initialized and constructed. 
 | 
default java.util.Collection<MethodInjectionPoint<T,?>> | 
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()  | 
default java.util.Optional<java.lang.String> | 
getScopeName()  | 
default java.util.List<Argument<?>> | 
getTypeArguments()
If the bean itself declares any type arguments this method will return the classes that represent those types. 
 | 
default java.util.List<Argument<?>> | 
getTypeArguments(java.lang.Class<?> type)
Return the type arguments for the given interface or super type for this bean. 
 | 
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 java.lang.Class<?>[] | 
getTypeParameters()
Returns the type parameters as a class array for the bean type. 
 | 
default java.lang.Class<?>[] | 
getTypeParameters(java.lang.Class<?> type)
Returns the type parameters as a class array for the given type. 
 | 
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 | 
isCandidateBean(Argument<?> beanType)
Return whether this bean type is a candidate for dependency injection for the passed type. 
 | 
default boolean | 
isIterable()  | 
default boolean | 
isProvided()
Deprecated. 
 
Provided beans are deprecated 
 | 
default boolean | 
isProxy()
Whether this bean definition represents a proxy. 
 | 
default boolean | 
isSingleton()  | 
default Qualifier<T> | 
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, synthesizeDeclaredAnnotationsByTypegetValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresentgetExposedTypes, isContainerType, isPrimary, requiresMethodProcessinggetAnnotationMetadataisEnabled, isEnabledstatic final java.lang.String NAMED_ATTRIBUTE
default java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getScope()
default java.util.Optional<java.lang.String> getScopeName()
default boolean isSingleton()
default java.util.Optional<Argument<?>> getContainerElement()
BeanType.isContainerType() returns true this will return the container element.default boolean isCandidateBean(@Nullable Argument<?> beanType)
BeanTypeisCandidateBean in interface BeanType<T>beanType - The bean type@Deprecated default boolean isProvided()
Provideddefault boolean isIterable()
EachProperty or
 EachBeanjava.lang.Class<T> getBeanType()
BeanTypegetBeanType in interface BeanType<T>default java.util.Optional<java.lang.Class<?>> getDeclaringType()
default ConstructorInjectionPoint<T> getConstructor()
default java.util.Collection<java.lang.Class<?>> getRequiredComponents()
default java.util.Collection<MethodInjectionPoint<T,?>> getInjectedMethods()
default java.util.Collection<FieldInjectionPoint<T,?>> getInjectedFields()
default java.util.Collection<MethodInjectionPoint<T,?>> getPostConstructMethods()
default java.util.Collection<MethodInjectionPoint<T,?>> getPreDestroyMethods()
@NonNull default java.lang.String getName()
default <R> java.util.Optional<ExecutableMethod<T,R>> findMethod(java.lang.String name, java.lang.Class<?>... argumentTypes)
ExecutableMethod for the given name and argument types.R - The return typename - The method nameargumentTypes - The argument typesExecutableMethoddefault <R> java.util.stream.Stream<ExecutableMethod<T,R>> findPossibleMethods(java.lang.String name)
R - The return typename - The method namedefault T inject(BeanContext context, T bean)
context - The contextbean - The beandefault T inject(BeanResolutionContext resolutionContext, BeanContext context, T bean)
resolutionContext - the resolution contextcontext - The contextbean - The beandefault java.util.Collection<ExecutableMethod<T,?>> getExecutableMethods()
ExecutableMethod instances for this definition@NonNull default Argument<T> asArgument()
asArgument in interface ArgumentCoercible<T>default boolean isProxy()
@NonNull default java.util.List<Argument<?>> getTypeArguments()
@NonNull default java.util.List<Argument<?>> getTypeArguments(java.lang.Class<?> type)
type - The super class or interface type@NonNull default java.lang.Class<?>[] getTypeParameters(@Nullable java.lang.Class<?> type)
type - The type@NonNull default java.lang.Class<?>[] getTypeParameters()
@NonNull default java.util.List<Argument<?>> getTypeArguments(java.lang.String type)
type - The super class or interface typedefault <R> ExecutableMethod<T,R> getRequiredMethod(java.lang.String name, java.lang.Class<?>... argumentTypes)
ExecutableMethod for the given name and argument types.R - The return typename - The method nameargumentTypes - The argument typesExecutableMethodjava.lang.IllegalStateException - If the method cannot be founddefault boolean isAbstract()
@Nullable default Qualifier<T> getDeclaredQualifier()