Introduce AbstractAugmentable 80/81880/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 1 May 2019 14:29:00 +0000 (16:29 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 May 2019 18:51:29 +0000 (20:51 +0200)
commit681f6e13a748b35e023e74e7046993fe50438025
treeb8f1c26fce6b4fbc846e5e3c487d618f468c97ed
parent680332443fe6e58b535985fc26a911e6f99d90f4
Introduce AbstractAugmentable

Binding generated code hand-implements handling of augmentations,
which leads to some amount of duplicated code, but notably a lot
of distinct implementations of Augmentatable.augmentation().

We can improve the situation by providing a simple base class which
holds an immutable map of augmentations implementing
AugmentationHolder and Augmentable interfaces.

JIRA: MDSAL-445
Change-Id: I693cd4fbec3d236f039e01448dc4994722b5582d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5e590b00d38ddbc28079d6f10928275136aa6b78)
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/AbstractAugmentable.java [new file with mode: 0644]
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/AugmentationHolder.java