|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.spring.SpringApplicationContext
@Service public class SpringApplicationContext
Static methods to access the Spring application context. It is set up as a service so Spring will create and initialize it.
| Constructor Summary | |
|---|---|
SpringApplicationContext()
|
|
| Method Summary | ||
|---|---|---|
static Object |
getBean(String beanName)
Returns the Spring bean, if any, with the given name. |
|
static
|
getBeanByType(Class<T> type)
Returns the first Spring bean found that is an instance of the given class. |
|
static org.springframework.context.ApplicationContext |
getContext()
|
|
static
|
listBeansOfType(Class<T> type)
Returns all the Spring beans that are instances of the given type. |
|
static
|
mapBeansOfType(Class<T> type)
Returns a map of all the Spring beans that are instances of the given type. |
|
void |
setApplicationContext(org.springframework.context.ApplicationContext appContext)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringApplicationContext()
| Method Detail |
|---|
public void setApplicationContext(org.springframework.context.ApplicationContext appContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic static Object getBean(String beanName)
public static <T> T getBeanByType(Class<T> type)
public static <T> List<T> listBeansOfType(Class<T> type)
public static <T> Map<String,T> mapBeansOfType(Class<T> type)
public static org.springframework.context.ApplicationContext getContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||