Hi
I am using a factory that does not implement an interface, with
AssistedInject to wire dependencies. My mapping
/** Binds instance to the instantiated instance. */
@Override
protected void configure() {
bind(HierarchicalListFactory.class).toProvider(
FactoryProvider.newFactory(HierarchicalListFactory.class,
HierarchicalList.class));
}
I get an error message
com.google.inject.CreationException: Guice creation errors:
1) An exception was caught and reported. Message:
com.jbe.cv.hierarchy.HierarchicalListFactory is not an interface
at com.google.inject.InjectorShell$Builder.build(InjectorShell.java:
135)
1 error
at
com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist
(Errors.java:354)
at com.google.inject.InjectorBuilder.initializeStatically
(InjectorBuilder.java:152)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at com.google.inject.Guice.createInjector(Guice.java:92)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
......
Does my factory have to implement an interface? In our code base, the
convention is not to have a factory implement an interface. Is there
an alternative?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---