Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(165)

Issue 196047: toInstnace() binding implementation

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by Dmitry.Negoda
Modified:
1 year, 3 months ago
Reviewers:
Base URL:
http://google-gin.googlecode.com/svn/trunk/
Visibility:
Public.

Description

> Couldn't find anything like toInstance in GIN, so I've developed one > myself. Here is the patch against svn revision 135: > http://ecwid.goldencoinsoft.com/instance-patch.diff > Usage: declare void methods named like "setXXX" in your ginjector: > interface MyGinjector extends Ginjector { > void setSomething(Something real); > void setAnotherThing(@Named("ID") int id); > void setAlltogether(Something real, @Named("ID") int id); > void setOptional(@Optional Object object); > } > Once all non-optional dependencies are set, you can call any other > ginjector methods. It's that simple. > I've included some tests which you can use as an example.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+512 lines, -25 lines) Patch
src/com/google/gwt/inject/client/Ginjector.java View 1 chunk +10 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/client/binder/GinLinkedBindingBuilder.java View 1 chunk +2 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/rebind/BindingsProcessor.java View 16 chunks +67 lines, -21 lines 0 comments Download
src/com/google/gwt/inject/rebind/GinScope.java View 1 chunk +1 line, -1 line 0 comments Download
src/com/google/gwt/inject/rebind/GinjectorOutputter.java View 12 chunks +108 lines, -2 lines 0 comments Download
src/com/google/gwt/inject/rebind/LieToGuiceModule.java View 3 chunks +30 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/rebind/adapter/AnnotatedBindingBuilderAdapter.java View 1 chunk +4 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/rebind/adapter/LinkedBindingBuilderAdapter.java View 2 chunks +5 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/rebind/binding/ToInstanceBinding.java View 1 chunk +31 lines, -0 lines 0 comments Download
src/com/google/gwt/inject/rebind/util/KeyUtil.java View 2 chunks +11 lines, -1 line 0 comments Download
src/com/google/gwt/inject/rebind/util/MemberCollector.java View 2 chunks +5 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/GinClientTestSuite.java View 2 chunks +2 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/Basket.java View 1 chunk +25 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/FruitInBasketGinModule.java View 1 chunk +24 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/FruitInBasketGinjector.java View 1 chunk +33 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/InstanceBindingTest.java View 1 chunk +130 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/WashedFruit.java View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 1
Dmitry.Negoda
14 years, 2 months ago (2010-01-28 08:49:40 UTC) #1

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b