Un-deprecate CopyableNode, AddedByUsesAware
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ModuleImport.java
index 68603049c56ef1ec1c1479c53cf8bbce9392a863..4a135bb4a2d6d8d6098fd665fd2786c6d9549cd2 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.ImportEffectiveStatement;
  * Interface describing YANG 'import' statement. The import statement makes definitions from one module available inside
  * another module or submodule.
  */
-// FIXME: 6.0.0: this class is a leak of the declared world into the effective one. In effective world, all nodes form
+// FIXME: 7.0.0: this class is a leak of the declared world into the effective one. In effective world, all nodes form
 //               a tree, which consists of multiple (mostly) QName-navigated namespaces. As such module imports
 //               contribute only a prefix/QNameModule mapping to the effective world and hence should be mapped that
 //               way:
@@ -28,7 +28,9 @@ public interface ModuleImport extends DocumentedNode, EffectiveStatementEquivale
      *
      * @return Name of the module to import
      */
-    @NonNull String getModuleName();
+    default @NonNull String getModuleName() {
+        return asEffectiveStatement().argument();
+    }
 
     /**
      * Returns the module revision to import. May be null.