Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JiBX 1.2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Add option "fluent-setters" so that generated code has

      public Sender setCompany(String company)

      { this.company = company; return this; }

      rather than:

      public void setCompany(String company)

      { this.company = company; }

      Could also be something called "setter-returns-this" or "builder-style-setters" or "chained-setters"

        Activity

        Hide
        Dennis Sosnoski added a comment -

        The new <code-decorator> customization implemented for the 1.2 release allows adding your own extensions to the code generation process: http://jibx.sourceforge.net/fromschema/codegen-customs.html#extend Using a decorator, it should be possible to make the setters fluent. See the decorator classes provided in the distribution for examples.

        Show
        Dennis Sosnoski added a comment - The new <code-decorator> customization implemented for the 1.2 release allows adding your own extensions to the code generation process: http://jibx.sourceforge.net/fromschema/codegen-customs.html#extend Using a decorator, it should be possible to make the setters fluent. See the decorator classes provided in the distribution for examples.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Nigel Charman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: