|
> 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.
|
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
|
Total messages: 1
|