Hello,
I am coming back to Guice-land after a while so please excuse my
ignorance if this has been asked before.
I have a scenario where I need to bind using TypeLiterals but my
class' constructor expects to be passed in a argument. I have been
toying around with @Assisted but no luck.
I am wondering if I am missing something, or if this is do'able even?
Here's a snippet from the Code.
// bind here
bind(new TypeLiteral<ExtendedStore<Company>>() {
}).to(new TypeLiteral<EclipseLinkStore<Company>>() {
});
---------------------------------------
// Constructor for EclipseLinkStore.
@Inject
public EclipseLinkStore(@Assisted Class<T> klass) {
super(klass);
}
Many thanks in advance.
Rahul
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---