T - The bean typepublic interface BeanDefinition<T> extends AnnotationMetadataDelegate, Named, BeanType<T>
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description |
|---|---|
<R> Optional<ExecutableMethod<T,R>> |
findMethod(String name,
Class... argumentTypes)
Finds a single
ExecutableMethod for the given name and argument types. |
<R> Stream<ExecutableMethod<T,R>> |
findPossibleMethods(String name)
Finds possible methods for the given method name.
|
Class<T> |
getBeanType()
Returns the bean type.
|
ConstructorInjectionPoint<T> |
getConstructor()
The single concrete constructor that is an injection point for creating the bean.
|
Optional<Class<?>> |
getDeclaringType() |
Collection<ExecutableMethod<T,?>> |
getExecutableMethods() |
Collection<FieldInjectionPoint> |
getInjectedFields()
All the fields that require injection.
|
Collection<MethodInjectionPoint> |
getInjectedMethods()
All methods that require injection.
|
String |
getName() |
Collection<MethodInjectionPoint> |
getPostConstructMethods()
All the methods that should be called once the bean has been fully initialized and constructed.
|
Collection<MethodInjectionPoint> |
getPreDestroyMethods()
All the methods that should be called when the object is to be destroyed.
|
Collection<Class> |
getRequiredComponents() |
default <R> ExecutableMethod<T,R> |
getRequiredMethod(String name,
Class... argumentTypes)
Finds a single
ExecutableMethod for the given name and argument types. |
Optional<Class<? extends Annotation>> |
getScope() |
default List<Argument<?>> |
getTypeArguments()
If the bean itself declares any type arguments this method will return the classes that represent those types.
|
default List<Argument<?>> |
getTypeArguments(Class<?> type)
Return the type arguments for the given interface or super type for this bean.
|
default List<Argument<?>> |
getTypeArguments(String type)
Return the type arguments for the given interface or super type for this bean.
|
default Class[] |
getTypeParameters()
Returns the type parameters as a class array for the bean type.
|
default Class[] |
getTypeParameters(Class<?> type)
Returns the type parameters as a class array for the given type.
|
T |
inject(BeanContext context,
T bean)
Inject the given bean with the context.
|
T |
inject(BeanResolutionContext resolutionContext,
BeanContext context,
T bean)
Inject the given bean with the context.
|
default boolean |
isAbstract() |
boolean |
isIterable() |
boolean |
isProvided() |
default boolean |
isProxy()
Whether this bean definition represents a proxy.
|
boolean |
isSingleton() |
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, 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, 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, synthesizeDeclaredAnnotationsByTypehasSimpleAnnotation, hasSimpleDeclaredAnnotationisPrimary, requiresMethodProcessinggetAnnotationMetadataisEnabledOptional<Class<? extends Annotation>> getScope()
boolean isSingleton()
boolean isProvided()
boolean isIterable()
EachProperty or
EachBeanClass<T> getBeanType()
BeanTypegetBeanType in interface BeanType<T>Optional<Class<?>> getDeclaringType()
ConstructorInjectionPoint<T> getConstructor()
Collection<Class> getRequiredComponents()
Collection<MethodInjectionPoint> getInjectedMethods()
Collection<FieldInjectionPoint> getInjectedFields()
Collection<MethodInjectionPoint> getPostConstructMethods()
Collection<MethodInjectionPoint> getPreDestroyMethods()
String getName()
<R> Optional<ExecutableMethod<T,R>> findMethod(String name, Class... argumentTypes)
ExecutableMethod for the given name and argument types.R - The return typename - The method nameargumentTypes - The argument typesExecutableMethod<R> Stream<ExecutableMethod<T,R>> findPossibleMethods(String name)
R - The return typename - The method nameT inject(BeanContext context, T bean)
context - The contextbean - The beanT inject(BeanResolutionContext resolutionContext, BeanContext context, T bean)
resolutionContext - the resolution contextcontext - The contextbean - The beanCollection<ExecutableMethod<T,?>> getExecutableMethods()
ExecutableMethod instances for this definitiondefault boolean isProxy()
@Nonnull default List<Argument<?>> getTypeArguments()
@Nonnull default List<Argument<?>> getTypeArguments(Class<?> type)
type - The super class or interface type@Nonnull default Class[] getTypeParameters(@Nullable Class<?> type)
type - The type@Nonnull default Class[] getTypeParameters()
@Nonnull default List<Argument<?>> getTypeArguments(String type)
type - The super class or interface typedefault <R> ExecutableMethod<T,R> getRequiredMethod(String name, Class... argumentTypes)
ExecutableMethod for the given name and argument types.R - The return typename - The method nameargumentTypes - The argument typesExecutableMethodIllegalStateException - If the method cannot be founddefault boolean isAbstract()