|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.inject.spring.SpringIntegration
public class SpringIntegration
Integrates Guice with Spring.
Method Summary | ||
---|---|---|
static void |
bindAll(Binder binder,
org.springframework.beans.factory.ListableBeanFactory beanFactory)
Binds all Spring beans from the given factory by name. |
|
static
|
fromSpring(Class<T> type,
String name)
Creates a provider which looks up objects from Spring using the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Provider<T> fromSpring(Class<T> type, 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |