Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectFactory.PredictObjectType Method

Predict the eventual object type (of the processed object instance) for the specified object.

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

Parameters

objectName
Name of the object.
mod
The merged object definition to determine the type for.

Return Value

The type of the object, or

null
if not predictable

Remarks

Does not need to handle FactoryObjects specifically, since it is only supposed to operate on the raw object type. This implementation is simplistic in that it is not able to handle factory methods and InstantiationAwareBeanPostProcessors. It only predicts the object type correctly for a standard object. To be overridden in subclasses, applying more sophisticated type detection.

See Also

AbstractObjectFactory Class | Spring.Objects.Factory.Support Namespace