Index getter methods by String 42/78042/5
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:50:16 +0000 (14:50 +0100)
commit4373edb6c40884357668a5099af5a1ea5fb0f76a
tree7a1bc852d4ff776787834a6238e5ed2323f19153
parenta14c9e20c6b0d122dbef05e5056e8a664c357e51
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 4c0eb46c1924ca71bb4092b0c91fceb5b790e3f8)
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