Cache NodeContextSuppliers in CodecDataObject
The binding between DataContainerCodecContext and CodecDataObject
is required only to support decoding child leaves, where we are
looking offset-based lookup.
Since each method has a fixed offset, which directly corresponds
to a NodeContextSupplier, we can short-circuit this lookup by
resolving NodeContextSupplier for each method into constant and
then pass it down to CodecDataObject -- thus side-stepping any
lookups and allowing the constant to be properly propagated.
That unfortunately means we need to initialize the generated class
early, so the fields are resolved in a well-controlled environment
-- for which we are using Customizer.customizeLoading() coupled
with a thread-local context managed by CodecDataObjectBridge.
JIRA: MDSAL-443
Change-Id: I9e24c30535c536d70b4eb60035b5aa744fc6ec9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>