Details
Description
It would be nice to add an attribute to the <collection> tag that permits to specify if the collection should be instanciated or not? For instance, I have this class:
class A
{
private List itsList = new ArrayList ();
public List getList ()
{return itsList;}}
As instanciating this class automatically instanciates the list, I do not want to have a setList method (nor I want JiBX instanciating a list and setting my itsList field)
This is now the default behavior - an existing object value will be reused rather than a new instance created. This does mean that collections need to be cleared when reusing existing objects in unmarshalling, which at present would need to be done using a pre-set method.