You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that bind(new TypeLiteral[Option[String]]() {}) is invoking the guice native method and thus not returning the scala wrapped builders that support the .toProvider[AnOptionProvider] syntax.
This does work:
bind[Option[String]].toProvider[AnOptionProvider]
I'm looking into what it would take to override the methods and return the Scala versions.
Consider:
I can do:
bind(new TypeLiteral[Option[String]]() {}).toProvider(classOf[AnOptionProvider])
But I can't do:
bind(new TypeLiteral[Option[String]]() {}).toProvider[AnOptionProvider]
Which is slightly more elegant.
I get the feeling I'm missing something from the README when it says:
Assuming this solved it, could that example be fleshed out?
The text was updated successfully, but these errors were encountered: