[MDSAL-549] Consider further specializing AbstractAugmentable Created: 04/May/20  Updated: 04/May/20

Status: Confirmed
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.


Generated at Wed Feb 07 20:10:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.