1、<T> T createBean(Class<T> beanClass) throws BeansException;
??Fully create a new bean instance of the given class.
??由某類型的.class創(chuàng)造一個(gè)bean。
2、void autowireBean(Object existingBean) throws BeansException;
??Populate the given bean instance through applying after-instantiation callbacks and bean property post-processing (e.g. for annotation-driven injection).
??在bean實(shí)例化和屬性設(shè)置完畢之后,填充對(duì)應(yīng)的bean instance
3、Object configureBean(Object existingBean, String beanName) throws BeansException;
??Configure the given raw bean: autowiring bean properties, applying bean property values, applying factory callbacks such as setBeanName and setBeanFactory, and also applying all bean post processors (including ones which might wrap the given raw bean).
??配置參數(shù)中給出的raw bean,自動(dòng)配置bean的屬性,包括對(duì)屬性賦值,設(shè)置好工廠類的回調(diào)函數(shù)(setBeanName、SetBeanFactory)。還有就是調(diào)用所有的post processors(包括那些對(duì)raw bean的包裝操作)
4、Object createBean(Class<?> beanClass, int autowireMode, boolean dependencyCheck) throws BeansException;
??Fully create a new bean instance of the given class with the specified autowire strategy. All constants defined in this interface are supported here.
??Performs full initialization of the bean, including all applicable BeanPostProcessors. This is effectively a superset of what autowire provides, adding initializeBean behavior.
??這是創(chuàng)建一個(gè)新的bean 實(shí)例的整個(gè)操作過(guò)程,參數(shù)描述了新的bean的class和其配置策略。在這個(gè)interface中定義的所有的常量,在這個(gè)方法中都可以使用。
??初始化一個(gè)bean的整個(gè)過(guò)程,包括所有可以適用的BeanPostProcessors。這是一個(gè)有效的***(最后一句真的不會(huì)翻譯了)
5、Object autowire(Class<?> beanClass, int autowireMode, boolean dependencyCheck) throws BeansException;
??Instantiate a new bean instance of the given class with the specified autowire strategy. All constants defined in this interface are supported here. Can also be invoked with AUTOWIRE_NO in order to just apply before-instantiation callbacks (e.g. for annotation-driven injection).
??Does not apply standard BeanPostProcessors callbacks or perform any further initialization of the bean. This interface offers distinct, fine-grained operations for those purposes, for example initializeBean. However, InstantiationAwareBeanPostProcessor callbacks are applied, if applicable to the construction of the instance.
??根據(jù)參數(shù)中指定的autowire(注入)方式,實(shí)例化一個(gè)由參數(shù)中類的新的bean??梢允褂眠@個(gè)借口中定義的所有常量。還可以在回調(diào)之前用AUTOWIRE_NO為順序來(lái)調(diào)用。
??對(duì)一個(gè)bean不用標(biāo)準(zhǔn)的BeanPostProcessors回調(diào)方法或者實(shí)現(xiàn)更多的初始化操作。這個(gè)為這個(gè)目的接口提供獨(dú)特的細(xì)粒度的操作方法,舉個(gè)初始化bean的例子來(lái)說(shuō),如果一個(gè)實(shí)例適用,就調(diào)用InstantiationAwareBeanPostProcessor。
6、void autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck) throws BeansException;
??Autowire the bean properties of the given bean instance by name or type. Can also be invoked with AUTOWIRE_NO in order to just apply after-instantiation callbacks (e.g. for annotation-driven injection).
??根據(jù)名字或者類型自動(dòng)注入?yún)?shù)中指定的bean實(shí)例的屬性。同時(shí)可以由AUTOWIRE_NO來(lái)對(duì)實(shí)例化后回調(diào)進(jìn)行排序。
7、void applyBeanPropertyValues(Object existingBean, String beanName) throws BeansException;
??Apply the property values of the bean definition with the given name to the given bean instance. The bean definition can either define a fully self-contained bean, reusing its property values, or just property values meant to be used for existing bean instances.
??對(duì)由名字和bean實(shí)例指定的bean進(jìn)行屬性復(fù)制操作。bean定義的屬性可以是單獨(dú)使用、重復(fù)使用、或者是屬性值表示bean實(shí)例可以使用。
未完待續(xù)。。。