diff --git a/src/hex/di/Injector.hx b/src/hex/di/Injector.hx index 0b767ed..ebffeb2 100644 --- a/src/hex/di/Injector.hx +++ b/src/hex/di/Injector.hx @@ -1,6 +1,6 @@ package hex.di; -import hex.collection.HashMap; +import hex.collection.ArrayMap; import hex.di.IDependencyInjector; import hex.di.IInjectorListener; import hex.di.error.InjectorException; @@ -30,7 +30,7 @@ class Injector { var _mapping : Map>; var _processedMapping : Map; - var _managedObjects : HashMap; + var _managedObjects : ArrayMap; var _parentInjector : Injector; var _classDescriptor : IClassDescriptionProvider; @@ -42,7 +42,7 @@ class Injector this._mapping = new Map(); this._processedMapping = new Map(); - this._managedObjects = new HashMap(); + this._managedObjects = new ArrayMap(); } public function createChildInjector() : Injector @@ -300,7 +300,7 @@ class Injector this._mapping = new Map(); this._processedMapping = new Map(); - this._managedObjects = new HashMap(); + this._managedObjects = new ArrayMap(); #if !macro this.trigger.disconnectAll(); diff --git a/src/hex/di/mapping/MappingConfiguration.hx b/src/hex/di/mapping/MappingConfiguration.hx index 36a534c..a29150e 100644 --- a/src/hex/di/mapping/MappingConfiguration.hx +++ b/src/hex/di/mapping/MappingConfiguration.hx @@ -1,13 +1,12 @@ package hex.di.mapping; -import hex.collection.HashMap; import hex.collection.Locator; import hex.config.stateful.IStatefulConfig; import hex.di.IDependencyInjector; +import hex.log.HexLog.getLogger; import hex.module.IContextModule; import hex.service.stateful.IStatefulService; import hex.util.Stringifier; -import hex.log.HexLog.getLogger; /** * ... @@ -15,8 +14,6 @@ import hex.log.HexLog.getLogger; */ class MappingConfiguration extends Locator implements IStatefulConfig { - var _mapping = new HashMap(); - public function new() { super(); @@ -67,8 +64,6 @@ class MappingConfiguration extends Locator implements IStatefulC injector.mapClassNameToValue( classKey, mapped, helper.mapName ); } - - this._mapping.put( classKey, mapped ); } } @@ -82,11 +77,6 @@ class MappingConfiguration extends Locator implements IStatefulC return this._registerMapping( className, new Helper( value, mapName, asSingleton, injectInto ), mapName ); } - public function getMapping() : HashMap - { - return this._mapping; - } - function _registerMapping( className : String, helper : Helper, ?mapName : String = "" ) : Bool { var className : String = ( mapName != "" ? mapName + "#" : "" ) + className;