Introduce AbstractAugmentable 50/81850/5
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 1 May 2019 14:29:00 +0000 (16:29 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 1 May 2019 15:24:02 +0000 (17:24 +0200)
commit5e590b00d38ddbc28079d6f10928275136aa6b78
tree69fb2078414fc4aaecc03441a13aa7c932a0fb25
parent39c1a86be4bb3ebc4e1e5033a652048366b64ef9
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>
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