public class SpringAware extends Object implements org.springframework.context.ApplicationContextAware, ContextAware
| Constructor and Description |
|---|
SpringAware() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.context.ApplicationContext |
getApplicationContext() |
<T> T |
getBean(Class<T> clazz) |
<T> T |
getBean(String name) |
<T> Map<String,T> |
getBeansOfType(Class<T> type) |
boolean |
hasBean(Class<?> clazz) |
boolean |
hasBean(String beanName) |
int |
priority() |
<T> T |
registerBean(Class<T> c) |
<T> T |
registerBean(String beanName,
Class<T> c) |
<T> T |
registerBean(String beanName,
Object bean) |
Object |
registerDeclWrapBean(String beanName,
DeclWarpBean declWarpBean) |
<T> T |
registerOrGet(String beanName,
Class<T> clazz) |
void |
setApplicationContext(org.springframework.context.ApplicationContext ac) |
public void setApplicationContext(org.springframework.context.ApplicationContext ac)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic static org.springframework.context.ApplicationContext getApplicationContext()
public <T> T getBean(String name)
getBean in interface ContextAwarepublic <T> Map<String,T> getBeansOfType(Class<T> type)
getBeansOfType in interface ContextAwarepublic <T> T getBean(Class<T> clazz)
getBean in interface ContextAwarepublic <T> T registerBean(String beanName, Class<T> c)
registerBean in interface ContextAwarepublic Object registerDeclWrapBean(String beanName, DeclWarpBean declWarpBean)
registerDeclWrapBean in interface ContextAwarepublic <T> T registerBean(Class<T> c)
registerBean in interface ContextAwarepublic <T> T registerBean(String beanName, Object bean)
registerBean in interface ContextAwarepublic <T> T registerOrGet(String beanName, Class<T> clazz)
registerOrGet in interface ContextAwarepublic boolean hasBean(String beanName)
hasBean in interface ContextAwarepublic boolean hasBean(Class<?> clazz)
hasBean in interface ContextAwarepublic int priority()
priority in interface SpiPriorityCopyright © 2025. All rights reserved.