| Package | org.pranaframework.ioc.factory.support |
| Class | public class DefaultListableObjectFactory |
| Inheritance | DefaultListableObjectFactory AbstractObjectFactory flash.events.EventDispatcher |
| Implements | IConfigurableListableObjectFactory, IObjectDefinitionRegistry |
| Subclasses | XMLObjectFactory |
| Property | Defined by | ||
|---|---|---|---|
| allowObjectDefinitionOverriding : Boolean
Whether to allow re-registration of a different definition with the same name
| DefaultListableObjectFactory | ||
| numObjectDefinitions : int [read-only]
Returns the number of definitions present in the object definition registry
| DefaultListableObjectFactory | ||
![]() | numObjectPostProcessors : int
Returns the number of object post processors.
| AbstractObjectFactory | |
| objectDefinitionNames : Array [read-only]
Returns an array containing all object definition names.
| DefaultListableObjectFactory | ||
![]() | typeConverter : ITypeConverter
The current type converter implementation
| AbstractObjectFactory | |
| Method | Defined by | ||
|---|---|---|---|
|
Contructs
DefaultListableObjectFactory
| DefaultListableObjectFactory | ||
![]() |
addObjectPostProcessor(objectPostProcessor:IObjectPostProcessor):void
Adds an object postprocessor to this object factory.
| AbstractObjectFactory | |
![]() |
addReferenceResolver(referenceResolver:IReferenceResolver):void
This method adds a reference resolver that will be used to resolve property
references.
| AbstractObjectFactory | |
![]() |
clearObjectFromInternalCache(name:String):Object
Removes an object from the internal object definition cache.
| AbstractObjectFactory | |
![]() |
containsObject(objectName:String):Boolean
Determines if the object factory contains a definition with the given name.
| AbstractObjectFactory | |
|
containsObjectDefinition(objectName:String):Boolean
Determines if an object definition with the given name exists
| DefaultListableObjectFactory | ||
![]() |
getObject(name:String, constructorArguments:Array = null):*
Will retrieve an object by it's name/id If the definition is a singleton it will be retrieved from
cache if possible.
| AbstractObjectFactory | |
|
getObjectDefinition(objectName:String):IObjectDefinition
Returns the object definition registered with the given name.
| DefaultListableObjectFactory | ||
|
getObjectNamesForType(type:Class):Array
Returns all object definitions names that implement the given type.
| DefaultListableObjectFactory | ||
|
getObjectsOfType(type:Class):Dictionary
Returns all object definitions that implement the given type.
| DefaultListableObjectFactory | ||
![]() |
getType(objectName:String):Class
Returns the type that is defined on the object definition.
| AbstractObjectFactory | |
![]() |
isFactoryObject(objectName:String):Boolean
Determines if an object is a IFactoryObject implementation.
| AbstractObjectFactory | |
![]() |
isPrototype(objectName:String):Boolean
Determines if the definition with the given name is a prototype.
| AbstractObjectFactory | |
![]() |
isSingleton(objectName:String):Boolean
Determines if the definition with the given name is a singleton.
| AbstractObjectFactory | |
|
preInstantiateSingletons():void
Instantiates all definitions that are defined as singleton and are not lazy.
| DefaultListableObjectFactory | ||
![]() |
registerCustomEditor(requiredType:Class, propertyEditor:IPropertyEditor):void
Registers a custom property editor.
| AbstractObjectFactory | |
|
registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void
Will register the given objectDefinition with the given name.
| DefaultListableObjectFactory | ||
|
removeObjectDefinition(objectName:String):void
Removes the definition with the given name from the registry
| DefaultListableObjectFactory | ||
![]() |
resolveReference(property:Object):Object
Resolves a property in an object definition.
| AbstractObjectFactory | |
| allowObjectDefinitionOverriding | property |
allowObjectDefinitionOverriding:Boolean [read-write]Whether to allow re-registration of a different definition with the same name
Implementation public function get allowObjectDefinitionOverriding():Boolean
public function set allowObjectDefinitionOverriding(value:Boolean):void
| numObjectDefinitions | property |
numObjectDefinitions:int [read-only]Returns the number of definitions present in the object definition registry
Implementation public function get numObjectDefinitions():int
| objectDefinitionNames | property |
objectDefinitionNames:Array [read-only]Returns an array containing all object definition names.
Implementation public function get objectDefinitionNames():Array
| DefaultListableObjectFactory | () | constructor |
public function DefaultListableObjectFactory()
Contructs DefaultListableObjectFactory
| containsObjectDefinition | () | method |
public function containsObjectDefinition(objectName:String):BooleanDetermines if an object definition with the given name exists
ParametersobjectName:String — The name/id of the object definition
|
Boolean |
| getObjectDefinition | () | method |
public function getObjectDefinition(objectName:String):IObjectDefinition
Returns the object definition registered with the given name. If the object
definition does not exist undefined will be returned.
objectName:String — The name/id of the definition to retrieve
|
IObjectDefinition —
The registered object definition, or undefined if the
definition has not been registered.
|
| getObjectNamesForType | () | method |
public function getObjectNamesForType(type:Class):Array
Returns all object definitions names that implement the given type. To check the type, the
ClassUtils.isImplementationOf method is used.
type:Class — The type that is searched for
|
Array — an array containing definition names that implement the given type
|
| getObjectsOfType | () | method |
public function getObjectsOfType(type:Class):Dictionary
Returns all object definitions that implement the given type. To check the type, the
ClassUtils.isImplementationOf method is used.
type:Class — The type that is searched for
|
Dictionary — A dictionary containing definitions that implement the given type. Definition
names are used as key.
|
| preInstantiateSingletons | () | method |
public function preInstantiateSingletons():voidInstantiates all definitions that are defined as singleton and are not lazy.
| registerObjectDefinition | () | method |
public function registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):voidWill register the given objectDefinition with the given name. If the allowObjectDefinitionOverriding has been set to true, this method will remove the existing object.
ParametersobjectName:String — The name under which the object definition should be stored
|
|
objectDefinition:IObjectDefinition — The object definition that should be stored
|
| removeObjectDefinition | () | method |
public function removeObjectDefinition(objectName:String):voidRemoves the definition with the given name from the registry
ParametersobjectName:String — The name/id of the definition to remove
|