The implementation contained in the above two attachments provides for three new properties:
o.e.c.b.collections.copy.suffix
A string property like the mostly undocumented o.e.c.b.collections.reference.suffix, except for
set-by-copy methods. Default is the empty string. Has no effect if not using
o.e.c.b.extraCollectionMethods.
o.e.c.b.collections.array.suffix
Also like reference.suffix, except for get-by- and set-by-array methods. Note that the set-by-
array methods get this suffix, even though they are also set-by-copy methods. Default is the
empty string. The user must take care that array.suffix and reference.suffix are not the same,
otherwise his/her code won't compile – it will have two methods with the same signature.
o.e.c.b.collections.useInterfaces
A boolean property that indicates that SG should not explicitly use ArrayList declarations for
collection handling. Specifically:
- Declaration of a collection - use List. (Note that default initialization is still ArrayList.)
- get[Element]ByReference - return List.
- set[Element]ByReference(element) - parameter is a List
- set[Element](elementCollection) - parameter is a Collection. (This patch also changes the
generated implementation to use an Iterator instead of direct access.)
Default is false. Has no effect if not using -types j2.
I've run both the MasterTestSuite and the RegressionTestSuite against the SG with this patch
applied and nothing failed that didn't also fail in the released version 0.9.5.
Created an attachment (id=293)
Patch to Source Generator implementing these enhancements