List properties

A list property is represented using a List or IList.

Suppose that field is a list property of type T (if T is a primitive type, then let T be the corresponding Java wrapper class or C# underlying struct). The following methods are generated:


   public List<T> getField() {...}

   public boolean isSetField() {...}

   public void unsetField()[3] {...}


   public IList<T> getField() {...}

   public bool isSetField() {...}

   public void unsetField()[3] {...}

XBinder's design for indexed and list properties takes its lead from JAXB's design. All mutation of the array and list can be under the control of the generated code, which might allow for earlier validation in the future.

[3] Since List properties do not have a setField method, it seemed odd to define either a 0- or 1-argument setField method, just to perform the function on "unsetting" the property. Thus, we have the unsetField method.