This repository was archived by the owner on Sep 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +22
-14
lines changed Expand file tree Collapse file tree 7 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 11project.manifest = manifest.xml
2-
3- base.source = source
2+ base.sourcePath = source
43
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module Internal {
1010// !
1111// !
1212// !
13+ (:background)
1314class Binding {
1415 private var resolutionRoot_;
1516 private var classDef_;
@@ -36,10 +37,10 @@ class Binding {
3637 }
3738
3839 if (requiredDependencies .size () == 0 ) {
39- return new classDef_ ();
40+ return new self . classDef_ ();
4041 }
4142 else {
42- return new classDef_ (configuredDependencies );
43+ return new self . classDef_ (configuredDependencies );
4344 }
4445 }
4546}
Original file line number Diff line number Diff line change 1313// !
1414// !
1515// !
16+ (:background)
1617class BindingSpec {
1718 private var interface_;
1819 private var classDef_;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module Internal {
88// !
99// !
1010// !
11+ (:background)
1112class Factory {
1213 private var resolutionRoot_;
1314
Original file line number Diff line number Diff line change 22//
33// Copyright Greg Caufield 2020
44
5- class Kernel {
5+ module MonkeyInject {
66
7+ // !
8+ // !
9+ // !
10+ (:background)
11+ class Kernel {
712 private var bindings_;
813
914 function initialize () {
@@ -23,3 +28,4 @@ class Kernel {
2328 return null ;
2429 }
2530}
31+ }
Original file line number Diff line number Diff line change 11// Module.mc
22//
33// Copyright 2020 Greg Caufield
4-
5-
64module MonkeyInject {
75
86// !
97// !
108// !
9+ (:background)
1110class Module {
1211 private var interfaces;
1312
@@ -16,7 +15,7 @@ class Module {
1615 }
1716
1817 function bind (interface ) {
19- interfaces [interface ] = new BindingSpec (interface );
18+ interfaces [interface ] = new Internal . BindingSpec (interface );
2019 return interfaces [interface ];
2120 }
2221
@@ -27,12 +26,12 @@ class Module {
2726 for (var i = 0 ; i < keys .size (); i ++ ) {
2827 var spec = interfaces [keys [i ]];
2928
30- if (spec .getScope () == BindingScopeTransient ) {
31- bindings [keys [i ]] = new Binding (resolutionRoot , spec );
32- } else if (spec .getScope () == BindingScopeSingleton ) {
33- bindings [keys [i ]] = new SingletonBinding (resolutionRoot , spec );
34- } else if (spec .getScope () == BindingScopeFactory ) {
35- bindings [keys [i ]] = new Factory (resolutionRoot );
29+ if (spec .getScope () == Internal . BindingScopeTransient ) {
30+ bindings [keys [i ]] = new Internal . Binding (resolutionRoot , spec );
31+ } else if (spec .getScope () == Internal . BindingScopeSingleton ) {
32+ bindings [keys [i ]] = new Internal . SingletonBinding (resolutionRoot , spec );
33+ } else if (spec .getScope () == Internal . BindingScopeFactory ) {
34+ bindings [keys [i ]] = new Internal . Factory (resolutionRoot );
3635 }
3736 }
3837 }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module Internal {
88// !
99// !
1010// !
11+ (:background)
1112class SingletonBinding extends Binding {
1213 private var instance_;
1314
You can’t perform that action at this time.
0 commit comments