C# Class Spring.Objects.Factory.Support.SimpleInstantiationStrategy

Inheritance: IInstantiationStrategy
Mostra file Open project: spring-projects/spring-net Class Usage Examples

Protected Properties

Property Type Description
log ILog

Public Methods

Method Description
Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory ) : object

Instantiate an instance of the object described by the supplied definition from the supplied factory.

Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory, ConstructorInfo constructor, object arguments ) : object

Instantiate an instance of the object described by the supplied definition from the supplied factory.

Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory, MethodInfo factoryMethod, object arguments ) : object

Instantiate an instance of the object described by the supplied definition from the supplied factory.

Protected Methods

Method Description
InstantiateWithMethodInjection ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string objectName, IObjectFactory factory ) : object

Instantiate an instance of the object described by the supplied definition from the supplied factory, injecting methods as appropriate.

The default implementation of this method is to throw a System.InvalidOperationException.

Derived classes can override this method if they can instantiate an object with the Method Injection specified in the supplied definition. Instantiation should use a no-arg constructor.

InstantiateWithMethodInjection ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string objectName, IObjectFactory factory, ConstructorInfo constructor, object arguments ) : object

Instantiate an instance of the object described by the supplied definition from the supplied factory, injecting methods as appropriate.

The default implementation of this method is to throw a System.InvalidOperationException.

Derived classes can override this method if they can instantiate an object with the Method Injection specified in the supplied definition. Instantiation should use the supplied constructor and attendant arguments.

Private Methods

Method Description
GetZeroArgConstructorInfo ( Type type ) : ConstructorInfo

Gets the zero arg ConstructorInfo object, if the type offers such functionality.

Method Details

Instantiate() public method

Instantiate an instance of the object described by the supplied definition from the supplied factory.
public Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory ) : object
definition Spring.Objects.Factory.Support.RootObjectDefinition /// The definition of the object that is to be instantiated. ///
name string /// The name associated with the object definition. The name can be the null /// or zero length string if we're autowiring an object that doesn't belong /// to the supplied . ///
factory IObjectFactory /// The owning ///
return object

Instantiate() public method

Instantiate an instance of the object described by the supplied definition from the supplied factory.
public Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory, ConstructorInfo constructor, object arguments ) : object
definition Spring.Objects.Factory.Support.RootObjectDefinition /// The definition of the object that is to be instantiated. ///
name string /// The name associated with the object definition. The name can be the null /// or zero length string if we're autowiring an object that doesn't belong /// to the supplied . ///
factory IObjectFactory /// The owning ///
constructor System.Reflection.ConstructorInfo /// The to be used to instantiate /// the object. ///
arguments object /// Any arguments to the supplied . May be null. ///
return object

Instantiate() public method

Instantiate an instance of the object described by the supplied definition from the supplied factory.
public Instantiate ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string name, IObjectFactory factory, MethodInfo factoryMethod, object arguments ) : object
definition Spring.Objects.Factory.Support.RootObjectDefinition /// The definition of the object that is to be instantiated. ///
name string /// The name associated with the object definition. The name can be the null /// or zero length string if we're autowiring an object that doesn't belong /// to the supplied . ///
factory IObjectFactory /// The owning ///
factoryMethod MethodInfo /// The to be used to get the object. ///
arguments object /// Any arguments to the supplied . May be null. ///
return object

InstantiateWithMethodInjection() protected method

Instantiate an instance of the object described by the supplied definition from the supplied factory, injecting methods as appropriate.

The default implementation of this method is to throw a System.InvalidOperationException.

Derived classes can override this method if they can instantiate an object with the Method Injection specified in the supplied definition. Instantiation should use a no-arg constructor.

protected InstantiateWithMethodInjection ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string objectName, IObjectFactory factory ) : object
definition Spring.Objects.Factory.Support.RootObjectDefinition /// The definition of the object that is to be instantiated. ///
objectName string /// The name associated with the object definition. The name can be a /// or zero length string if we're autowiring an object that /// doesn't belong to the supplied . ///
factory IObjectFactory /// The owning ///
return object

InstantiateWithMethodInjection() protected method

Instantiate an instance of the object described by the supplied definition from the supplied factory, injecting methods as appropriate.

The default implementation of this method is to throw a System.InvalidOperationException.

Derived classes can override this method if they can instantiate an object with the Method Injection specified in the supplied definition. Instantiation should use the supplied constructor and attendant arguments.

protected InstantiateWithMethodInjection ( Spring.Objects.Factory.Support.RootObjectDefinition definition, string objectName, IObjectFactory factory, ConstructorInfo constructor, object arguments ) : object
definition Spring.Objects.Factory.Support.RootObjectDefinition /// The definition of the object that is to be instantiated. ///
objectName string /// The name associated with the object definition. The name can be the null /// or zero length string if we're autowiring an object that doesn't belong /// to the supplied . ///
factory IObjectFactory /// The owning ///
constructor System.Reflection.ConstructorInfo /// The to be used to instantiate /// the object. ///
arguments object /// Any arguments to the supplied . May be null. ///
return object

Property Details

log protected_oe static_oe property

The shared Common.Logging.ILog instance for this class (and derived classes).
protected static ILog log
return ILog