Index getter methods by String 43/78043/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Nov 2018 09:20:45 +0000 (10:20 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 22 Nov 2018 13:51:29 +0000 (14:51 +0100)
commitc34db6e95f9ee1221fc37d4ecbf234b17b8766c9
treed88fa3ffb032bc3139f9965d675cd9cd5746dbdf
parent812a658cb4bc85ec29b0656d5e91ccd541890f20
Index getter methods by String

Looking up by String offers slight advantage over Method lookup,
because we'll end up with a constant hashCode() over objects which
are guaranteed to be interned.

This rework implies we no longer get to have a map whose keySet
reflects property methods -- which is fine, as the keyset would
take up more memory than a plain array, so we retain the methods
in an array -- hence this ends up being a net win in both cases.

JIRA: MDSAL-398
Change-Id: I36526ce15735d4ef8e4ba847bcc24ea69b950e94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4373edb6c40884357668a5099af5a1ea5fb0f76a)
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/DataObjectCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/KeyedListNodeCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/LazyDataObject.java