public class SpringIntegration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SpringIntegration.InjectableSpringProvider<T> |
(package private) static class |
SpringIntegration.SpringProvider<T> |
Modifier | Constructor and Description |
---|---|
private |
SpringIntegration() |
Modifier and Type | Method and Description |
---|---|
static void |
bindAll(Binder binder,
org.springframework.beans.factory.ListableBeanFactory beanFactory)
Binds all Spring beans from the given factory by name.
|
(package private) static <T> void |
bindBean(Binder binder,
org.springframework.beans.factory.ListableBeanFactory beanFactory,
java.lang.String name,
java.lang.Class<T> type) |
static <T> Provider<T> |
fromSpring(java.lang.Class<T> type,
java.lang.String name)
Creates a provider which looks up objects from Spring using the given name.
|
public static <T> Provider<T> fromSpring(java.lang.Class<T> type, java.lang.String name)
BeanFactory
. Example usage:
bind(DataSource.class) .toProvider(fromSpring(DataSource.class, "dataSource"));
public static void bindAll(Binder binder, org.springframework.beans.factory.ListableBeanFactory beanFactory)
@Named("foo")
.Named
,
Names.named(String)
static <T> void bindBean(Binder binder, org.springframework.beans.factory.ListableBeanFactory beanFactory, java.lang.String name, java.lang.Class<T> type)