Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectFactory.InstantiateObject Method

Create an object instance for the given object definition.

[Visual Basic]
Protected MustOverride Sub InstantiateObject( _
   ByVal name As String, _
   ByVal definition As RootObjectDefinition, _
   ByVal arguments As Object, _
   ByVal allowEagerCaching As Boolean, _
   ByVal suppressConfigure As Boolean _
protected abstract object InstantiateObject(
   string name,
   RootObjectDefinition definition,
   object[] arguments,
   bool allowEagerCaching,
   bool suppressConfigure


The name of the object.
The object definition for the object that is to be instantiated.
The arguments to use if creating a prototype using explicit arguments to a static factory method. It is invalid to use a non-a null reference (Nothing in Visual Basic) arguments value in any other case.
Whether eager caching of singletons is allowed... typically true for singlton objects, but never true for inner object definitions.
Create instance only - suppress injecting dependencies yet.

Return Value

A new instance of the object.


The object definition will already have been merged with the parent definition in case of a child definition.

All the other methods in this class invoke this method, although objects may be cached after being instantiated by this method. All object instantiation within this class is performed by this method.


Exception Type Condition
ObjectsException In case of errors.

See Also

AbstractObjectFactory Class | Spring.Objects.Factory.Support Namespace