Basically I need to do something like this to customize a binding on a 
collection because of the complexity.

<structure field="UDAs" class="java.util.ArrayList" 
marshaller="com.mckesson.binding.marshalling.UDAMarshaller" 
unmarshaller="com.mckesson.binding.marshalling.UDAMarshaller"/>

This works fine, but the type of objects I need to create in the marshaller can 
differ and I'm trying to make this generic for this type UDAs.  For example 
there could be ContractUDA, BusinessEntityUDA, ProviderUDA, and so on.   I 
don't want to have to create a new unmarshaller for each type.

So I was wondering if you could use generics in JiBX to type it like this.  
Then I can handle the type in the class and act accordingly.

<structure field="UDAs" class="java.util.ArrayList" 
marshaller="com.mckesson.binding.marshalling.UDAMarshaller<BusinessEntityUDA>" 
unmarshaller="com.mckesson.binding.marshalling.UDAMarshaller<BusinessEntityUDA>"/>

Or, is it possible to use the constructor?

<structure field="UDAs" class="java.util.ArrayList" 
marshaller="com.mckesson.binding.marshalling.UDAMarshaller(BusinessEntityUDA.class)"
 
unmarshaller="com.mckesson.binding.marshalling.UDAMarshaller(BusinessEntityUDA.class)"/>



------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to