Revert "Fix JDK9 compilation"
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / UnknownSchemaNode.java
index e7f5d224b1c7b4fd6534f228b6d77ad10cf3a99d..274c46597321cc6892f9f854e0589975639acfdc 100644 (file)
@@ -9,19 +9,42 @@ package org.opendaylight.yangtools.yang.model.api;
 
 import org.opendaylight.yangtools.yang.common.QName;
 
-public interface UnknownSchemaNode extends SchemaNode {
-
+/**
+ * Contains the methods for getting the details about the unknown node.
+ */
+public interface UnknownSchemaNode extends SchemaNode, AddedByUsesAware {
+    /**
+     * Returns QName instance with the name of the unknown node.
+     *
+     * @return QName with name the name of the unknown node.
+     */
     QName getNodeType();
 
+    /**
+     * Returns name of the unknown node.
+     *
+     * @return string with the name of unknown node.
+     */
     String getNodeParameter();
 
-    boolean isAddedByUses();
+    /**
+     * Describes whether the node was added through <code>augment</code> YANG
+     * statement.
+     *
+     * @return boolean value which is <code>true</code> if the node is added by
+     *         <code>augment</code> YANG statement
+     *
+     * @deprecated This method exposes mechanism of how this node was instantiated. This runs contrary to the idea
+     *             that a SchemaNode is part of the effective model of the world. Examining a node's DeclaredStatement
+     *             world should be sufficient to ascertain its origin.
+     */
+    @Deprecated
+    boolean isAddedByAugmentation();
 
     /**
-     * Get extension definition which identifies this node
+     * Get extension definition which identifies this node.
      *
      * @return extension definition if exists, null otherwise
      */
     ExtensionDefinition getExtensionDefinition();
-
 }