Add another 3.0.0 note 07/69807/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 22 Mar 2018 11:53:21 +0000 (12:53 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 22 Mar 2018 11:53:21 +0000 (12:53 +0100)
Our use of Strings for YANG identifiers is confusing to the users
who need to map that string to other namespaces. Expressing the fact
that the string is composed of a limited set of characters would
be beneficial to, for example, mdsal's codegen components.

On the other hand, paying the cost of class encapsulation may not
be feasible and we should just be documenting contractual contents.

Change-Id: I3557bd180a63881b26848f087940ae62816e4214
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/stmt/ModuleEffectiveStatement.java

index 5676204aa68d8151796adbe7bb0d61f26669f7ff..7eea1e0264555f3f7eb187052520f2723a23ce7b 100644 (file)
@@ -17,6 +17,10 @@ import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
  * Effective view of a {@link ModuleStatement}.
  */
 @Beta
+// FIXME: 3.0.0: we should reshuffle the String here, as module name is in reality a YANG identifier, e.g. not just
+//               an ordinary String. We really want this to be a QName, so that we do not need the localQNameModule
+//               bit, but that may be problematic with ModuleStatement, which is getting created before we even know
+//               the namespace :( A type capture of the string may just be sufficient.
 public interface ModuleEffectiveStatement extends EffectiveStatement<String, ModuleStatement> {
     /**
      * Namespace mapping all known prefixes in a module to their modules. Note this namespace includes the module
@@ -54,7 +58,7 @@ public interface ModuleEffectiveStatement extends EffectiveStatement<String, Mod
      *
      * @return Local QNameModule
      */
-    // FIXME: 3.0.0 make this method non-default
+    // FIXME: 3.0.0 make this method non-default.
     default @NonNull QNameModule localQNameModule() {
         throw new UnsupportedOperationException(getClass() + " is missing an implementation");
     }