Add QNameModule documentation 08/98508/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 14 Nov 2021 18:40:49 +0000 (19:40 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 14 Nov 2021 19:21:08 +0000 (20:21 +0100)
QNameModule is a widely-used class, make sure it is documented.

Change-Id: Ie57e0649b639680ad28af5e2c011da9bd8a7f2d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 78eb0897ffa5084c2d90a3d609e93df401e40856)

common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java

index 0221ecc821f54559571d938d17d1c63d247d370f..a4f345f6e6d7ea3a95b1fe54efb8870ec924cfa5 100644 (file)
@@ -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<QNameModule>, Immutable, Serializable, Identifier, WritableObject {
     private static final Interner<QNameModule> INTERNER = Interners.newWeakInterner();
     private static final long serialVersionUID = 3L;
@@ -162,8 +167,10 @@ public final class QNameModule implements Comparable<QNameModule>, 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() {