Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18183/Spring/Spring.Core/Objects/Factory/Support
Modified Files:
AbstractAutowireCapableObjectFactory.cs
AbstractObjectFactory.cs DefaultListableObjectFactory.cs
IObjectDefinitionRegistry.cs
PropertiesObjectDefinitionReader.cs RootObjectDefinition.cs
Log Message:
Added centralised Type resolution mechanism, runtime type converter, Xml Config handler, multiple documentation updates.
Index: RootObjectDefinition.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/RootObjectDefinition.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** RootObjectDefinition.cs 16 Jul 2004 13:59:03 -0000 1.4
--- RootObjectDefinition.cs 26 Jul 2004 07:47:57 -0000 1.5
***************
*** 458,462 ****
throw new ObjectDefinitionValidationException (
"IFactoryObject must be defined as singleton - " +
! "IFactoryObjects themselves are not allowed to be prototypes");
}
if (ObjectClass.GetConstructors ().Length == 0)
--- 458,462 ----
throw new ObjectDefinitionValidationException (
"IFactoryObject must be defined as singleton - " +
! "IFactoryObjects themselves are not allowed to be prototypes.");
}
if (ObjectClass.GetConstructors ().Length == 0)
Index: AbstractAutowireCapableObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AbstractAutowireCapableObjectFactory.cs 16 Jul 2004 13:59:03 -0000 1.2
--- AbstractAutowireCapableObjectFactory.cs 26 Jul 2004 07:47:56 -0000 1.3
***************
*** 59,62 ****
--- 59,63 ----
/// <author>Juergen Hoeller</author>
/// <author>Rick Evans (.NET)</author>
+ /// <version>$Id$</version>
public abstract class AbstractAutowireCapableObjectFactory :
AbstractObjectFactory, IAutowireCapableObjectFactory
***************
*** 132,136 ****
/// <remarks>
/// <p>
! /// Must use deep copy, so that we don&t permanently modify this property.
/// </p>
/// </remarks>
--- 133,137 ----
/// <remarks>
/// <p>
! /// Must use deep copy, so that we don't permanently modify this property.
/// </p>
/// </remarks>
***************
*** 147,151 ****
MutablePropertyValues deepCopy = new MutablePropertyValues (pvs);
PropertyValue [] pvals = deepCopy.PropertyValues;
! for (int i = 0; i < pvals.Length; i++)
{
object value = ResolveValueIfNecessary (
--- 148,152 ----
MutablePropertyValues deepCopy = new MutablePropertyValues (pvs);
PropertyValue [] pvals = deepCopy.PropertyValues;
! for (int i = 0; i < pvals.Length; ++i)
{
object value = ResolveValueIfNecessary (
***************
*** 847,851 ****
/// </p>
/// <p>
! /// Custom init methods are reolved in a <b>case-insensitive</b> manner.
/// </p>
/// </remarks>
--- 848,852 ----
/// </p>
/// <p>
! /// Custom init methods are resolved in a <b>case-insensitive</b> manner.
/// </p>
/// </remarks>
***************
*** 854,858 ****
/// </param>
/// <param name="objectName">
! /// The object has in the factory. Used for debug output.
/// </param>
/// <param name="mergedObjectDefinition">
--- 855,859 ----
/// </param>
/// <param name="objectName">
! /// The name the object has in the factory. Used for debug output.
/// </param>
/// <param name="mergedObjectDefinition">
***************
*** 864,868 ****
RootObjectDefinition mergedObjectDefinition)
{
-
if (target is IInitializingObject)
{
--- 865,868 ----
***************
*** 879,883 ****
((IInitializingObject) target).AfterPropertiesSet ();
}
-
if (mergedObjectDefinition.InitMethodName != null)
{
--- 879,882 ----
***************
*** 946,950 ****
/// </p>
/// <p>
! /// Custom destroy methods are reolved in a <b>case-insensitive</b> manner.
/// </p>
/// </remarks>
--- 945,949 ----
/// </p>
/// <p>
! /// Custom destroy methods are resolved in a <b>case-insensitive</b> manner.
/// </p>
/// </remarks>
***************
*** 1080,1084 ****
}
}
-
try
{
--- 1079,1082 ----
Index: AbstractObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AbstractObjectFactory.cs 9 Jul 2004 15:03:37 -0000 1.2
--- AbstractObjectFactory.cs 26 Jul 2004 07:47:57 -0000 1.3
***************
*** 65,69 ****
/// <p>
/// For example, if the/ managed object identified as <code>foo</code> is a
! /// factory, getting <code>&foo</code> will return the factory, not the
/// instance returned by the factory.
/// </p>
--- 65,69 ----
/// <p>
/// For example, if the/ managed object identified as <code>foo</code> is a
! /// factory, getting <code>'foo</code> will return the factory, not the
/// instance returned by the factory.
/// </p>
Index: PropertiesObjectDefinitionReader.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/PropertiesObjectDefinitionReader.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PropertiesObjectDefinitionReader.cs 23 Jul 2004 10:17:58 -0000 1.2
--- PropertiesObjectDefinitionReader.cs 26 Jul 2004 07:47:57 -0000 1.3
***************
*** 404,411 ****
if (typeName != null)
{
! // Load the type using a special class loader if one is available.
! // Otherwise rely on the thread context classloader.
! // Class clazz = Class.forName(className, true, getBeanClassLoader());
! Type type = ObjectUtils.LocateType(typeName) ;
if (type == null)
{
--- 404,408 ----
if (typeName != null)
{
! Type type = ObjectUtils.ResolveType (typeName) ;
if (type == null)
{
***************
*** 418,422 ****
objectDefinition = new ChildObjectDefinition(parent, pvs);
}
-
objectDefinition.IsSingleton = singleton;
objectDefinition.LazyInit = lazyInit;
--- 415,418 ----
Index: IObjectDefinitionRegistry.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionRegistry.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** IObjectDefinitionRegistry.cs 6 Jul 2004 12:54:27 -0000 1.1
--- IObjectDefinitionRegistry.cs 26 Jul 2004 07:47:57 -0000 1.2
***************
*** 48,52 ****
public interface IObjectDefinitionRegistry
{
-
/// <summary>
/// Return the number of objects defined in the registry.
--- 48,51 ----
***************
*** 58,62 ****
{
get;
-
}
--- 57,60 ----
***************
*** 104,108 ****
/// <summary>
/// Register a new object definition with this registry.
! /// Must support RootBeanDefinition and ChildBeanDefinition.
/// </summary>
/// <param name="name">
--- 102,108 ----
/// <summary>
/// Register a new object definition with this registry.
! /// Must support
! /// <see cref="Spring.Objects.Factory.Support.RootObjectDefinition"/>
! /// and <see cref="Spring.Objects.Factory.Support.ChildObjectDefinition"/>.
/// </summary>
/// <param name="name">
Index: DefaultListableObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DefaultListableObjectFactory.cs 16 Jul 2004 13:59:03 -0000 1.2
--- DefaultListableObjectFactory.cs 26 Jul 2004 07:47:57 -0000 1.3
***************
*** 284,288 ****
objectDefinition.ResourceDescription,
name,
! "Validation of object definition with name failed",
ex);
}
--- 284,288 ----
objectDefinition.ResourceDescription,
name,
! "Validation of object definition with name failed.",
ex);
}
|