Clean up XML instance identifier class naming 26/108026/8
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Sep 2023 17:39:39 +0000 (19:39 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Sep 2023 21:01:50 +0000 (23:01 +0200)
commit99715f7b5483c08f7fe4ec9232281ea04a3941b2
tree013242e4797ed30f8f80619a887ee7f82c4bc414
parent9eb8ac2c8481d48e9eac7f39be3b7b89a4629e8f
Clean up XML instance identifier class naming

Naming of things here is not great. We have two distinct implementations
of a full Codec, one of which can handle serialization and the other can
handle parsing.

Clean up naming, by having a top-level, fixed,
InstanceIdentifierXmlCodec, which is what we give users. We then have
InstanceIdentifier{Deserializer,Serializer}, which are bound, single-use
delegates.

This allows us to ditch the thread local stack we have been keeping to
deal with the fact that the implementation is directly internal.

Furthermore we optimize instantiation, so that we minimize the number of
calls to DataSchemaContextTree.from().

JIRA: YANGTOOLS-1543
Change-Id: I1ca884fe57086311111f12b3ba223d08f3676a93
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/AbstractInstanceIdentifierCodec.java [new file with mode: 0644]
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/InstanceIdentifierDeserializer.java [new file with mode: 0644]
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/InstanceIdentifierSerializer.java [moved from codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/RandomPrefixInstanceIdentifierSerializer.java with 61% similarity]
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/InstanceIdentifierXmlCodec.java [new file with mode: 0644]
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/SchemaAwareXMLStreamWriterUtils.java
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XmlCodec.java
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XmlCodecFactory.java
codec/yang-data-codec-xml/src/main/java/org/opendaylight/yangtools/yang/data/codec/xml/XmlStringInstanceIdentifierCodec.java [deleted file]