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

Helper class for use in object factory implementations, resolving values contained in object definition objects into the actual values applied to the target object instance.
Used by AbstractAutowireCapableObjectFactory.
Afficher le fichier Open project: spring-projects/spring-net Class Usage Examples

Méthodes publiques

Méthode Description
ObjectDefinitionValueResolver ( Spring.Objects.Factory.Support.AbstractObjectFactory objectFactory ) : System

Initializes a new instance of the ObjectDefinitionValueResolver class.

ResolveValueIfNecessary ( string name, IObjectDefinition definition, string argumentName, object argumentValue ) : object

Given a property value, return a value, resolving any references to other objects in the factory if necessary.

The value could be :

An Spring.Objects.Factory.Config.IObjectDefinition, which leads to the creation of a corresponding new object instance. Singleton flags and names of such "inner objects" are always ignored: inner objects are anonymous prototypes.

A Spring.Objects.Factory.Config.RuntimeObjectReference, which must be resolved.

An Spring.Objects.Factory.Config.IManagedCollection. This is a special placeholder collection that may contain Spring.Objects.Factory.Config.RuntimeObjectReferences or collections that will need to be resolved.

An ordinary object or , in which case it's left alone.

Méthodes protégées

Méthode Description
ResolveInnerObjectDefinition ( string name, string innerObjectName, string argumentName, IObjectDefinition definition, bool singletonOwner ) : object

Resolves an inner object definition.

ResolveReference ( IObjectDefinition definition, string name, string argumentName, Spring.Objects.Factory.Config.RuntimeObjectReference reference ) : object

Resolve a reference to another object in the factory.

ResolveTargetType ( Spring.Objects.Factory.Config.TypedStringValue value ) : Type

Resolve the target type of the passed TypedStringValue.

Private Methods

Méthode Description
AdaptInnerObjectName ( string innerObjectName ) : string

Checks the given bean name whether it is unique. If not already unique, a counter is added, increasing the counter until the name is unique.

ResolvePropertyValue ( string name, IObjectDefinition definition, string argumentName, object argumentValue ) : object

TODO

Method Details

ObjectDefinitionValueResolver() public méthode

Initializes a new instance of the ObjectDefinitionValueResolver class.
public ObjectDefinitionValueResolver ( Spring.Objects.Factory.Support.AbstractObjectFactory objectFactory ) : System
objectFactory Spring.Objects.Factory.Support.AbstractObjectFactory The object factory.
Résultat System

ResolveInnerObjectDefinition() protected méthode

Resolves an inner object definition.
protected ResolveInnerObjectDefinition ( string name, string innerObjectName, string argumentName, IObjectDefinition definition, bool singletonOwner ) : object
name string /// The name of the object that surrounds this inner object definition. ///
innerObjectName string /// The name of the inner object definition... note: this is a synthetic /// name assigned by the factory (since it makes no sense for inner object /// definitions to have names). ///
argumentName string /// The name of the property the value of which is being resolved. ///
definition IObjectDefinition /// The definition of the inner object that is to be resolved. ///
singletonOwner bool /// if the owner of the property is a singleton. ///
Résultat object

ResolveReference() protected méthode

Resolve a reference to another object in the factory.
protected ResolveReference ( IObjectDefinition definition, string name, string argumentName, Spring.Objects.Factory.Config.RuntimeObjectReference reference ) : object
definition IObjectDefinition /// The definition of the named object. ///
name string /// The name of the object that is having the value of one of its properties resolved. ///
argumentName string /// The name of the property the value of which is being resolved. ///
reference Spring.Objects.Factory.Config.RuntimeObjectReference /// The runtime reference containing the value of the property. ///
Résultat object

ResolveTargetType() protected méthode

Resolve the target type of the passed TypedStringValue.
protected ResolveTargetType ( Spring.Objects.Factory.Config.TypedStringValue value ) : Type
value Spring.Objects.Factory.Config.TypedStringValue The who's target type is to be resolved
Résultat System.Type

ResolveValueIfNecessary() public méthode

Given a property value, return a value, resolving any references to other objects in the factory if necessary.

The value could be :

An Spring.Objects.Factory.Config.IObjectDefinition, which leads to the creation of a corresponding new object instance. Singleton flags and names of such "inner objects" are always ignored: inner objects are anonymous prototypes.

A Spring.Objects.Factory.Config.RuntimeObjectReference, which must be resolved.

An Spring.Objects.Factory.Config.IManagedCollection. This is a special placeholder collection that may contain Spring.Objects.Factory.Config.RuntimeObjectReferences or collections that will need to be resolved.

An ordinary object or , in which case it's left alone.

public ResolveValueIfNecessary ( string name, IObjectDefinition definition, string argumentName, object argumentValue ) : object
name string /// The name of the object that is having the value of one of its properties resolved. ///
definition IObjectDefinition /// The definition of the named object. ///
argumentName string /// The name of the property the value of which is being resolved. ///
argumentValue object /// The value of the property that is being resolved. ///
Résultat object