Class BeanInstanceDescriptor
- java.lang.Object
-
- org.springframework.aot.context.bootstrap.generator.bean.descriptor.BeanInstanceDescriptor
-
public final class BeanInstanceDescriptor extends Object
Describe how an instance of a bean can be supplied.- Author:
- Stephane Nicoll
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BeanInstanceDescriptor.Builder
static class
BeanInstanceDescriptor.MemberDescriptor<T extends Member>
Describe aMember
that is used to initialize a Bean instance.static class
BeanInstanceDescriptor.PropertyDescriptor
Describe a property that is used to initialize a Bean instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvableType
getBeanType()
Return thetype
of the bean.List<BeanInstanceDescriptor.MemberDescriptor<?>>
getInjectionPoints()
Return the injection points to invoke to populate extra dependencies for the bean, in the order they should be invoked.BeanInstanceDescriptor.MemberDescriptor<Executable>
getInstanceCreator()
Return theExecutable
that should be used to instantiate the bean ornull
if no such information is available.List<BeanInstanceDescriptor.PropertyDescriptor>
getProperties()
Return the properties that should be set for the bean.Class<?>
getUserBeanClass()
Return the bean typeClass
.static BeanInstanceDescriptor.Builder
of(Class<?> beanType)
Create a new builder for the specified bean type.static BeanInstanceDescriptor.Builder
of(ResolvableType beanType)
Create a new builder for the specified bean type.
-
-
-
Method Detail
-
of
public static BeanInstanceDescriptor.Builder of(ResolvableType beanType)
Create a new builder for the specified bean type.- Parameters:
beanType
- the type of the bean- Returns:
- a new builder
-
of
public static BeanInstanceDescriptor.Builder of(Class<?> beanType)
Create a new builder for the specified bean type.- Parameters:
beanType
- the type of the bean- Returns:
- a new builder
-
getBeanType
public ResolvableType getBeanType()
Return thetype
of the bean.- Returns:
- the type of the bean
-
getUserBeanClass
public Class<?> getUserBeanClass()
Return the bean typeClass
.- Returns:
- the class of the bean, as defined by the user
-
getInstanceCreator
public BeanInstanceDescriptor.MemberDescriptor<Executable> getInstanceCreator()
Return theExecutable
that should be used to instantiate the bean ornull
if no such information is available.- Returns:
- the method or constructor to use to create the bean
-
getInjectionPoints
public List<BeanInstanceDescriptor.MemberDescriptor<?>> getInjectionPoints()
Return the injection points to invoke to populate extra dependencies for the bean, in the order they should be invoked.- Returns:
- the injection points, if any
-
getProperties
public List<BeanInstanceDescriptor.PropertyDescriptor> getProperties()
Return the properties that should be set for the bean. Properties are automatically applied by the bean factory.- Returns:
- the properties, if any
-
-