限定符和类型 | 方法和说明 |
---|---|
<T> T |
addBean(Class<T> type)
Create bean by type, and register to ioc container
|
void |
addBean(Object bean)
Add bean to ioc container
|
void |
addBean(String name,
Object bean)
Add bean to ioc container
|
void |
clearAll()
Clean ioc container
|
Object |
createBean(Class<?> type) |
<T> T |
getBean(Class<T> type)
Get bean instance by class type
|
Object |
getBean(String name)
Get bean instance by name
|
BeanDefine |
getBeanDefine(Class<?> type)
Get BeanDefine by bean type
|
List<BeanDefine> |
getBeanDefines()
Get ioc container bean defines
|
Set<String> |
getBeanNames()
Get ioc bean names
|
List<Object> |
getBeans()
Get ioc container all beans
|
void |
remove(Class<?> type)
Remove bean by class type
|
void |
remove(String beanName)
Remove bean by name
|
void |
setBean(Class<?> type,
Object proxyBean)
Set bean, e.g aop proxy
|
void addBean(Object bean)
bean
- bean instancevoid addBean(String name, Object bean)
name
- bean namebean
- bean instance<T> T addBean(Class<T> type)
T
- class Typetype
- bean class typevoid setBean(Class<?> type, Object proxyBean)
type
- bean class typeproxyBean
- bean instance by proxyObject getBean(String name)
name
- bean name<T> T getBean(Class<T> type)
T
- typetype
- class typeList<BeanDefine> getBeanDefines()
BeanDefine getBeanDefine(Class<?> type)
type
- bean class typevoid remove(Class<?> type)
type
- bean class typevoid remove(String beanName)
beanName
- bean namevoid clearAll()
Copyright © 2019. All rights reserved.