* 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:
*
* @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.