castor
  1. castor
  2. CASTOR-471

Enhancement: two new features to control Source Generator collection method generation

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.9.5
    • Fix Version/s: None
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      1331
    • Number of attachments :
      0

      Description

      1) Source Generator by default exposes collections only as arrays. When
      o.e.c.b.extraCollectionMethods is set to true, it also exposes the underlying collection object, but
      only as an afterthought. It would be nice to have the option to have the collection accessors be
      the primary "bean-like" methods for generated objects.

      2) When generating fields/methods in Java 2 mode, Source Generator uses ArrayLists as a drop-in
      replacement for Vectors. This overlooks the flexibility possible with Java 2 collections. It would be
      better to use parameters/return values of type List so that code that uses the generated object
      model are not forced to convert to/from ArrayLists.

      I'll attach a patch and one new class that implements these two features. They are disabled by
      default, but may be enabled through properties in castorbuilder.properties.

        Activity

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            rhett-sutphin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour, 30 minutes
              1h 30m
              Remaining:
              Time Spent - 1 hour Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - 1 hour Remaining Estimate - 30 minutes
              1h