BeanDefinitions
using the builder pattern. Intended primarily for use when implementing Spring 2.0
NamespaceHandlers.
| Modifier and Type | Field and Description |
|---|---|
| private final AbstractBeanDefinition | beanDefinition
The |
| private int | constructorArgIndex
Our current position with respect to constructor args. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public BeanDefinitionBuilder | addAutowiredProperty(String
the name of the property to mark as autowired name)Add an autowired marker for the specified property on the specified bean. |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | addDependsOn(String beanName)
Append the specified bean name to the list of beans that this definition depends on. |
| public BeanDefinitionBuilder | addPropertyReference(String
the name of the property to add the reference to name, String the name of the bean being referenced beanName)Add a reference to the specified bean name under the property specified. |
| public BeanDefinitionBuilder | addPropertyValue(String name, Object value)
Add the supplied property value under the given property name. |
| public BeanDefinitionBuilder | applyCustomizers(BeanDefinitionCustomizer... customizers)
Apply the given customizers to the underlying bean definition. |
| public static BeanDefinitionBuilder | childBeanDefinition(String
the name of the parent bean parentName)Create a new |
| public static BeanDefinitionBuilder | genericBeanDefinition()
Create a new |
| public static BeanDefinitionBuilder | genericBeanDefinition(String
the class name for the bean that the definition is being created for beanClassName)Create a new |
| public static BeanDefinitionBuilder | genericBeanDefinition(Class<?>
the beanClass)Class of the bean that the definition is being created forCreate a new |
| public static <T> BeanDefinitionBuilder | genericBeanDefinition(Class<T>
the beanClass, Supplier<T> Class of the bean that the definition is being created fora callback for creating an instance of the bean instanceSupplier)Create a new |
| public AbstractBeanDefinition | |
| public AbstractBeanDefinition | |
| public static BeanDefinitionBuilder | rootBeanDefinition(String
the class name for the bean that the definition is being created for beanClassName)Create a new |
| public static BeanDefinitionBuilder | rootBeanDefinition(String
the class name for the bean that the definition is being created for beanClassName, String the name of the method to use to construct the bean instance factoryMethodName)Create a new |
| public static BeanDefinitionBuilder | rootBeanDefinition(Class<?>
the beanClass)Class of the bean that the definition is being created forCreate a new |
| public static BeanDefinitionBuilder | rootBeanDefinition(Class<?>
the beanClass, String Class of the bean that the definition is being created forthe name of the method to use to construct the bean instance factoryMethodName)Create a new |
| public static <T> BeanDefinitionBuilder | rootBeanDefinition(ResolvableType
the beanType, Supplier<T> type of the bean that the definition is being created fora callback for creating an instance of the bean instanceSupplier)Create a new |
| public static <T> BeanDefinitionBuilder | rootBeanDefinition(Class<T>
the beanClass, Supplier<T> Class of the bean that the definition is being created fora callback for creating an instance of the bean instanceSupplier)Create a new |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | setFactoryMethod(String factoryMethod)
Set the name of a static factory method to use for this definition, to be called on this bean's class. |
| public BeanDefinitionBuilder | setFactoryMethodOnBean(String
the name of the factory method factoryMethod, String the name of the bean to call the specified factory method on factoryBean)Set the name of a non-static factory method to use for this definition, including the bean name of the factory instance to call the method on. |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | |
| public BeanDefinitionBuilder | setSynthetic(boolean synthetic)
Set whether this bean is 'synthetic', that is, not defined by the application itself. |
| beanDefinition | back to summary |
|---|---|
| private final AbstractBeanDefinition beanDefinition The | |
| constructorArgIndex | back to summary |
|---|---|
| private int constructorArgIndex Our current position with respect to constructor args. | |
| BeanDefinitionBuilder | back to summary |
|---|---|
| private BeanDefinitionBuilder(AbstractBeanDefinition beanDefinition) Enforce the use of factory methods. | |
| addAutowiredProperty | back to summary |
|---|---|
| public BeanDefinitionBuilder addAutowiredProperty(String name) Add an autowired marker for the specified property on the specified bean.
| |
| addConstructorArgReference | back to summary |
|---|---|
| public BeanDefinitionBuilder addConstructorArgReference(String beanName) Add a reference to a named bean as a constructor arg.
| |
| addConstructorArgValue | back to summary |
|---|---|
| public BeanDefinitionBuilder addConstructorArgValue(Object value) Add an indexed constructor arg value. The current index is tracked internally and all additions are at the present point. | |
| addDependsOn | back to summary |
|---|---|
| public BeanDefinitionBuilder addDependsOn(String beanName) Append the specified bean name to the list of beans that this definition depends on. | |
| addPropertyReference | back to summary |
|---|---|
| public BeanDefinitionBuilder addPropertyReference(String name, String beanName) Add a reference to the specified bean name under the property specified. | |
| addPropertyValue | back to summary |
|---|---|
| public BeanDefinitionBuilder addPropertyValue(String name, Object value) Add the supplied property value under the given property name. | |
| applyCustomizers | back to summary |
|---|---|
| public BeanDefinitionBuilder applyCustomizers(BeanDefinitionCustomizer... customizers) Apply the given customizers to the underlying bean definition.
| |
| childBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder childBeanDefinition(String parentName) Create a new
| |
| genericBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder genericBeanDefinition() Create a new | |
| genericBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder genericBeanDefinition(String beanClassName) Create a new
| |
| genericBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder genericBeanDefinition(Class<?> beanClass) Create a new
| |
| genericBeanDefinition | back to summary |
|---|---|
| public static <T> BeanDefinitionBuilder genericBeanDefinition(Class<T> beanClass, Supplier<T> instanceSupplier) Create a new | |
| getBeanDefinition | back to summary |
|---|---|
| public AbstractBeanDefinition getBeanDefinition() Validate and return the created BeanDefinition object. | |
| getRawBeanDefinition | back to summary |
|---|---|
| public AbstractBeanDefinition getRawBeanDefinition() Return the current BeanDefinition object in its raw (unvalidated) form.
| |
| rootBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder rootBeanDefinition(String beanClassName) Create a new
| |
| rootBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder rootBeanDefinition(String beanClassName, String factoryMethodName) Create a new | |
| rootBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder rootBeanDefinition(Class<?> beanClass) Create a new
| |
| rootBeanDefinition | back to summary |
|---|---|
| public static BeanDefinitionBuilder rootBeanDefinition(Class<?> beanClass, String factoryMethodName) Create a new | |
| rootBeanDefinition | back to summary |
|---|---|
| public static <T> BeanDefinitionBuilder rootBeanDefinition(ResolvableType beanType, Supplier<T> instanceSupplier) Create a new
| |
| rootBeanDefinition | back to summary |
|---|---|
| public static <T> BeanDefinitionBuilder rootBeanDefinition(Class<T> beanClass, Supplier<T> instanceSupplier) Create a new
| |
| setAbstract | back to summary |
|---|---|
| public BeanDefinitionBuilder setAbstract(boolean flag) Set whether this definition is abstract. | |
| setAutowireMode | back to summary |
|---|---|
| public BeanDefinitionBuilder setAutowireMode(int autowireMode) Set the autowire mode for this definition. | |
| setDependencyCheck | back to summary |
|---|---|
| public BeanDefinitionBuilder setDependencyCheck(int dependencyCheck) Set the dependency check mode for this definition. | |
| setDestroyMethodName | back to summary |
|---|---|
| public BeanDefinitionBuilder setDestroyMethodName(String methodName) Set the destroy method for this definition. | |
| setFactoryMethod | back to summary |
|---|---|
| public BeanDefinitionBuilder setFactoryMethod(String factoryMethod) Set the name of a static factory method to use for this definition, to be called on this bean's class. | |
| setFactoryMethodOnBean | back to summary |
|---|---|
| public BeanDefinitionBuilder setFactoryMethodOnBean(String factoryMethod, String factoryBean) Set the name of a non-static factory method to use for this definition, including the bean name of the factory instance to call the method on. | |
| setInitMethodName | back to summary |
|---|---|
| public BeanDefinitionBuilder setInitMethodName(String methodName) Set the init method for this definition. | |
| setLazyInit | back to summary |
|---|---|
| public BeanDefinitionBuilder setLazyInit(boolean lazy) Set whether beans for this definition should be lazily initialized or not. | |
| setParentName | back to summary |
|---|---|
| public BeanDefinitionBuilder setParentName(String parentName) Set the name of the parent definition of this bean definition. | |
| setPrimary | back to summary |
|---|---|
| public BeanDefinitionBuilder setPrimary(boolean primary) Set whether this bean is a primary autowire candidate.
| |
| setRole | back to summary |
|---|---|
| public BeanDefinitionBuilder setRole(int role) Set the role of this definition. | |
| setScope | back to summary |
|---|---|
| public BeanDefinitionBuilder setScope(String scope) Set the scope of this definition. | |
| setSynthetic | back to summary |
|---|---|
| public BeanDefinitionBuilder setSynthetic(boolean synthetic) Set whether this bean is 'synthetic', that is, not defined by the application itself.
| |