Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-957

Overriding Object methods using "field" closure methods on Expando

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-3
    • Fix Version/s: 1.0-JSR-3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux

      Description

      The Expando dynamic bean handler is currently unable to support overriding default methods of Object, such as hashCode, equals and toString. This is quite useful if multiple expando objects are to be placed in a map or list, or if you wish to customize the output generated when printing the object.

      Included is a simple patch for this purpose. The included testcase illustrates its usage.

        Attachments

        1. expando-patch.txt
          4 kB
          Hein Meling

          Activity

            People

            • Assignee:
              phkim Kim, Pilho
              Reporter:
              meling Hein Meling
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: