Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-470 Add DataObject default methods
  3. MDSAL-473

Add DataObject.bindingEquals(Object)

    XMLWordPrintable

Details

    • Sub-task
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 7.0.0
    • Binding codegen

    Description

      In order to maintain proper equality contracts, we need to share as much code as possible between compile-time and runtime. Create a

      interface Foo extends DataObject {
          static boolean bindingEquals(final @NonNull Foo thisObj, final Object obj) {
              // ...
          }
      }
      

      method, which will define equality contract on the generated type. This code already exists in generated build implementations, which need to be updated to defer to these methods. The method needs to be static so in case of Augmentable objects it enforces that thisObj is AugmentationHolder<Foo>.

       

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

              ilyaigushev Ilya Igushev
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: