fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

"no implementation bound" in spite of @Provides methods w/ correct annotation #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Constructor code:

    @Inject
    DialogView(@Close Button closeButton) {
      ...
    }

Module code:

    @Provides @Close
    Button provideCloseButton() {
        Button closeButton = new Button("Close");
        return closeButton;
    }

What is the expected output? What do you see instead?

Expect: Compile successful

See:

Compiling module com.inet.report.test.Test
   Scanning for additional dependencies: file:/C:/workspace/Prompt/src/com/inet/report/test/client/Test.java
      Computing all possible rebind results for 'com.inet.report.test.client.TestGinjector'
         Rebinding com.inet.report.prompt.client.TestGinjector
            Invoking com.google.gwt.dev.javac.StandardGeneratorContext@118dcec
               [ERROR] No implementation bound for key Key[type=com.google.gwt.user.client.ui.Button, 
annotation=@com.inet.report.test.client.Close]

What version of the product are you using? On what operating system?
2.0

Original issue reported on code.google.com by johnste...@gmail.com on 28 Jan 2010 at 1:58

GoogleCodeExporter commented 9 years ago
whoops i mean 1.0

sorry :)

Original comment by johnste...@gmail.com on 28 Jan 2010 at 1:59

GoogleCodeExporter commented 9 years ago
My fault. For anyone else having the same problem, the issue was that in my 
Ginjector I 
didn't bind the module with

@GinModules(TestGinModule.class)

Please close as invalid.

Original comment by johnste...@gmail.com on 28 Jan 2010 at 3:05

GoogleCodeExporter commented 9 years ago
Yep, most common cause for this kind of problem. :)

Original comment by aragos on 28 Jan 2010 at 6:23