|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.core.utils.BeanUtils
public class BeanUtils
Helper methods for working with Spring beans.
| Method Summary | ||
|---|---|---|
static
|
getBean(org.springframework.beans.factory.access.BeanFactoryReference beanFactory,
String beanId,
Class<T> clazz)
Get a Spring bean by name. |
|
static
|
getBean(String contextId,
String beanId,
Class<T> clazz)
Helper method that combines getBeanFactory and getBean. |
|
static org.springframework.beans.factory.access.BeanFactoryReference |
getBeanFactory(String contextId)
Get a Spring BeanFactory by context ID. |
|
static
|
getFactory(String contextId,
Class<T> clazz)
Helper method that calls getBeanFactory(contextId).getFactory() and casts the result. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static org.springframework.beans.factory.access.BeanFactoryReference getBeanFactory(String contextId)
contextId - the context ID of the BeanFactory to fetch
public static <T> T getBean(org.springframework.beans.factory.access.BeanFactoryReference beanFactory,
String beanId,
Class<T> clazz)
T - class for the returned beanbeanFactory - bean factory to use to fetch this beanbeanId - ID of the bean to fetchclazz - class representing the type for the returned bean
public static <T> T getBean(String contextId,
String beanId,
Class<T> clazz)
T - class for the returned beancontextId - the context ID of the BeanFactory from which to fetch
this beanbeanId - ID of the bean to fetchclazz - class representing the type for the returned bean
public static <T> T getFactory(String contextId,
Class<T> clazz)
T - class for the returned factorycontextId - the context ID of the BeanFactory to fetchclazz - class representing the type for the returned factory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||