@Component public final class SpringBeanLocator extends Object
<context:annotation-config /> <bean class="net.sf.jstuff.integration.spring.SpringBeanLocator" />or
<context:annotation-config /> <context:component-scan base-package="net.sf.jstuff.integration.spring" />
| Modifier and Type | Method and Description |
|---|---|
<T> T |
byClass(Class<T> beanType)
Returns the spring managed bean with the given type
|
<T> T |
byName(String beanName)
Returns the spring managed bean with the given name.
|
static SpringBeanLocator |
get() |
org.springframework.beans.factory.ListableBeanFactory |
getBeanFactory() |
public static SpringBeanLocator get()
public <T> T byClass(Class<T> beanType)
beanType - the type of the beanpublic <T> T byName(String beanName)
beanName - the bean namepublic org.springframework.beans.factory.ListableBeanFactory getBeanFactory()
Copyright © 2010–2021 Vegard IT GmbH, Germany. All rights reserved.