PDA

View Full Version : Generics support for DelegateFactoryObject


john.hui
02-11-2007, 12:47 AM
Hi,

I am having some difficulty with the class Spring.Objects.Factory.Config.DelegateFactoryObjec t.

I need to set MethodName to a generic method. So I have the following statement in my XML Context:

<property name="MethodName" value="GenericMethod&lt;SomeType>"/>

This gives me a {"Error binding to target method."} exception.

However, when I set it to a non generic method, there is no more exception.

I would like to know if MethodName supports generics.

Thank you.

John

.ben
02-11-2007, 10:19 AM
I think it does.
value="DelegateTypeName&lt;yourGenericTypesgoHereSeperatedWi thCommas>,TheAssemblyYourGenericTypeIsIn"/>

Bruno Baia
02-12-2007, 02:59 AM
Hi,

I think it does.
value="DelegateTypeName&lt;yourGenericTypesgoHereSeperatedWi thCommas>,TheAssemblyYourGenericTypeIsIn"/>
ThisWillWorkToSetATypeProperty. :)

The problem here, is that MethodName property is of type string.
I've created an issue in JIRA (http://opensource.atlassian.com/projects/spring/browse/SPRNET-481).


Bruno

Bruno Baia
08-04-2007, 02:26 AM
Hi,

the issue has been resolved, you should be able to do that :

I need to set MethodName to a generic method. So I have the following statement in my XML Context:

<property name="MethodName" value="GenericMethod&lt;SomeType>"/>


Bruno

john.hui
08-28-2007, 04:32 AM
Thanks Bruno.

Can't wait to test this.

John