Details
-
Improvement
-
Status: Confirmed
-
Medium
-
Resolution: Unresolved
-
None
-
None
-
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.