public class ExtendsSpringBeanContainer extends SpringBeanContainer
Constructor and Description |
---|
ExtendsSpringBeanContainer() |
ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent,
ClassLoader loader) |
ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent,
ClassLoader loader,
Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz) |
ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent,
List<FileObject> files,
ClassLoader loader) |
ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent,
List<FileObject> files,
ClassLoader loader,
Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
<T> T |
getBean(Class<T> clazz)
获取指定类型的Bean
|
<T> T |
getBean(String name)
获取指定名称的Bean
|
<T> T |
getBean(String name,
Class<T> clazz)
获取指定类型指定名称的Bean
|
org.springframework.context.ApplicationContext |
getBeanContainerPrototype()
返回原生的Bean窗口类型
|
<T> Collection<T> |
getBeans(Class<T> type)
返回指定类型的bean列表
|
BeanContainer<?> |
getSubBeanContainer(ClassLoader loader) |
BeanContainer<?> |
getSubBeanContainer(List<FileObject> files,
ClassLoader loader)
获取子容器
|
Map<ClassLoader,BeanContainer<?>> |
getSubBeanContainers()
返回子窗口列表
|
void |
refresh() |
void |
regSpringConfigXml(List<FileObject> files) |
void |
regSpringConfigXml(String files) |
void |
removeSubBeanContainer(ClassLoader loader) |
void |
removeUrl(String urlString) |
void |
setApplicationContext(org.springframework.context.support.AbstractRefreshableConfigApplicationContext context)
当调用无参构造函数时,会默认初始化为FileSystemXmlApplicationContext实例
可通过此方法改变ApplicationContext的实例
|
void |
setApplicationType(Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz)
当调用无参构造函数时,会默认初始化为FileSystemXmlApplicationContext实例
可通过此方法改变ApplicationContext的类型
|
void |
setParent(BeanContainer<?> container) |
public ExtendsSpringBeanContainer()
public ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent, ClassLoader loader)
public ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent, ClassLoader loader, Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz)
public ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent, List<FileObject> files, ClassLoader loader, Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz)
public ExtendsSpringBeanContainer(ExtendsSpringBeanContainer parent, List<FileObject> files, ClassLoader loader)
public org.springframework.context.ApplicationContext getBeanContainerPrototype()
BeanContainer
getBeanContainerPrototype
in interface BeanContainer<org.springframework.context.ApplicationContext>
getBeanContainerPrototype
in class SpringBeanContainer
public void setApplicationType(Class<? extends org.springframework.context.support.AbstractRefreshableConfigApplicationContext> clazz)
clazz
- public void setApplicationContext(org.springframework.context.support.AbstractRefreshableConfigApplicationContext context)
clazz
- public BeanContainer<?> getSubBeanContainer(List<FileObject> files, ClassLoader loader)
BeanContainer
getSubBeanContainer
in interface BeanContainer<org.springframework.context.ApplicationContext>
getSubBeanContainer
in class SpringBeanContainer
public BeanContainer<?> getSubBeanContainer(ClassLoader loader)
getSubBeanContainer
in interface BeanContainer<org.springframework.context.ApplicationContext>
getSubBeanContainer
in class SpringBeanContainer
public Map<ClassLoader,BeanContainer<?>> getSubBeanContainers()
BeanContainer
getSubBeanContainers
in interface BeanContainer<org.springframework.context.ApplicationContext>
getSubBeanContainers
in class SpringBeanContainer
public <T> Collection<T> getBeans(Class<T> type)
BeanContainer
getBeans
in interface BeanContainer<org.springframework.context.ApplicationContext>
getBeans
in class SpringBeanContainer
public <T> T getBean(String name)
BeanContainer
getBean
in interface BeanContainer<org.springframework.context.ApplicationContext>
getBean
in class SpringBeanContainer
public <T> T getBean(Class<T> clazz)
BeanContainer
getBean
in interface BeanContainer<org.springframework.context.ApplicationContext>
getBean
in class SpringBeanContainer
public <T> T getBean(String name, Class<T> clazz)
BeanContainer
getBean
in interface BeanContainer<org.springframework.context.ApplicationContext>
getBean
in class SpringBeanContainer
public void regSpringConfigXml(List<FileObject> files)
regSpringConfigXml
in class SpringBeanContainer
public void regSpringConfigXml(String files)
regSpringConfigXml
in class SpringBeanContainer
public void removeUrl(String urlString)
removeUrl
in class SpringBeanContainer
public void refresh()
refresh
in class SpringBeanContainer
public void setParent(BeanContainer<?> container)
setParent
in interface BeanContainer<org.springframework.context.ApplicationContext>
setParent
in class SpringBeanContainer
public void removeSubBeanContainer(ClassLoader loader)
removeSubBeanContainer
in interface BeanContainer<org.springframework.context.ApplicationContext>
removeSubBeanContainer
in class SpringBeanContainer
public void clear()
Copyright © 2006–2018 TinyGroup. All rights reserved.