"to" method of Guice builder
See original GitHub issueI import Guice like this:
native("jvm")
module guicy "1.0.0" {
import "com.google.inject:guice" "4.0";
import ceylon.interop.java "1.2.0";
}
I have this code to configure Guice:
import ceylon.interop.java {
javaClass
}
import com.google.inject {
inject,
AbstractModule
}
interface Bar {}
class BarImpl() satisfies Bar {}
inject class Foo(Bar bar) {
}
object fooBarModule extends AbstractModule() {
shared actual void configure() {
bind(javaClass<Bar>()).to(javaClass<BarImpl>());
}
}
I get an error that this is no to()
method for AnnotatedBindingBuilder
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Guice injection with Builder pattern for client lib - Stack Overflow
Guice operates at runtime, so it's essential that we see your main method to see what your application code actually does.
Read more >Guide to Google Guice - Baeldung
A quick, practical guide to dependency injection in Google Guice. ... This main method retrieves an instance of our Communication class.
Read more >java.lang.Object play.inject.guice.GuiceBuilder<Self,Delegate>
Class GuiceBuilder<Self,Delegate extends play.api.inject.guice.GuiceBuilder<Delegate>> ... A builder for creating Guice-backed Play Injectors. Field ...
Read more >FactoryModuleBuilder | Guice - Google
Provides a factory that combines the caller's arguments with injector-supplied values to construct objects. Defining a factory. Create an interface whose ...
Read more >Feature Request Guice automatically builder pattern
I would like to use a builder (preferably auto-value) with Guice. Guice can find constructors annotated with @Inject but those can be cumbersome...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Expletive!
Why so it does 😃