Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-549

Consider further specializing AbstractAugmentable

    XMLWordPrintable

Details

    • Improvement
    • Status: Confirmed
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • Binding codegen
    • None

    Description

      Keyed lists provide a combination of Augmentable and Identifiable. We should be able to specialize AbstractIdentifiableAugmentable, so that we end up sharing the same implementation:

      package org.opendaylight.yangtools.yang.binding;
      
      @Beta
      public abstract AbstractIdentifiableAugmentable<I extends Identifier<T>, T extends Augmentable<T> & Identifiable<I>>
          extends AbstractAugmentable<T> implements Identifiable<I> {
      
          private final @NonNull I key;
      
      
          @Override
          public final I key() {
              return key;
          }
      }

      generated classes can then take advantage of it and overlay this with an interface-specific specialized implementation. This should result in the number of runtime-visible effective implementations going down, hopefully making JIT's life easier.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: