Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectFactory.GetTypeForFactoryObject(String, RootObjectDefinition) Method

Gets the object type for the given FactoryObject definition, as far as possible. Only called if there is no singleton instance registered for the target object already.

[Visual Basic]
Protected Overridable Overloads Sub GetTypeForFactoryObject( _
   ByVal objectName As String, _
   ByVal mod As RootObjectDefinition _
)
[C#]
protected virtual Type GetTypeForFactoryObject(
   string objectName,
   RootObjectDefinition mod
);

Parameters

objectName
Name of the object.
mod
The merged object definition for the object.

Return Value

The type for the object if determinable, or

null
otherwise

Remarks

The default implementation creates the FactoryObject via

GetObject
to call its
ObjectType
property. Subclasses are encouraged to optimize this, typically by just instantiating the FactoryObject but not populating it yet, trying whether its
ObjectType
property already returns a type. If no type found, a full FactoryObject creation as performed by this implementation should be used as fallback.

See Also

AbstractObjectFactory Class | Spring.Objects.Factory.Support Namespace | AbstractObjectFactory.GetTypeForFactoryObject Overload List