From: Robert Varga Date: Sun, 14 Nov 2021 18:40:49 +0000 (+0100) Subject: Add QNameModule documentation X-Git-Tag: v7.0.10~14 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=8a6b2fd2cdcacdb8a9f84d73c7797f7224f5807e;p=yangtools.git Add QNameModule documentation QNameModule is a widely-used class, make sure it is documented. Change-Id: Ie57e0649b639680ad28af5e2c011da9bd8a7f2d2 Signed-off-by: Robert Varga (cherry picked from commit 78eb0897ffa5084c2d90a3d609e93df401e40856) --- diff --git a/common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java b/common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java index 0221ecc821..a4f345f6e6 100644 --- a/common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java +++ b/common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java @@ -24,6 +24,11 @@ import org.opendaylight.yangtools.concepts.Identifier; import org.opendaylight.yangtools.concepts.Immutable; import org.opendaylight.yangtools.concepts.WritableObject; +/** + * A {@link XMLNamespace} bound to a particular model {@link Revision}. This is the primary way of identifying a YANG + * module namespace within an effective model world. The reason for this is that we support coexistence of multiple + * module revisions and hence cannot use plain module name or namespace to address them. + */ public final class QNameModule implements Comparable, Immutable, Serializable, Identifier, WritableObject { private static final Interner INTERNER = Interners.newWeakInterner(); private static final long serialVersionUID = 3L; @@ -162,8 +167,10 @@ public final class QNameModule implements Comparable, Immutable, Se @Override public @NonNull String toString() { - return MoreObjects.toStringHelper(QNameModule.class).omitNullValues().add("ns", namespace) - .add("rev", revision).toString(); + return MoreObjects.toStringHelper(QNameModule.class).omitNullValues() + .add("ns", namespace) + .add("rev", revision) + .toString(); } Object writeReplace() {