BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / Builder.java
index 1f1052bb5a07d67deaea7b09048e9e8abbf02bd4..3e136562f6130f363c27dceedbecd80a4c5768c2 100644 (file)
@@ -8,37 +8,34 @@
 package org.opendaylight.yangtools.yang.parser.builder.api;
 
 import java.util.List;
-
-import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
+import org.opendaylight.yangtools.concepts.Mutable;
 
 /**
  * Parent interface for all builder interfaces.
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
  */
-public interface Builder {
+@Deprecated
+public interface Builder extends Mutable {
 
     /**
-     * Get name of module in which this node is declared.
+     * Returns name of module in which node created by this builder
+     * was declared.
      *
      * @return module name
      */
     String getModuleName();
 
     /**
-     * Set name of module in which this node is declared.
-     *
-     * @param moduleName
-     */
-    void setModuleName(String moduleName);
-
-    /**
-     * Get current line in yang file.
+     * Get current line in yang file, on which statement
+     * associated with this builder was declared.
      *
      * @return current line in yang file
      */
     int getLine();
 
     /**
-     * Get parent node of this node.
+     * Returns parent node builder of this node.
      *
      * @return parent node builder or null if this is top level node
      */
@@ -53,9 +50,13 @@ public interface Builder {
     void setParent(Builder parent);
 
     /**
-     * Add unknown node to this builder.
+     * Adds an unknown node builder to this builder.
+     *
+     * When product (child) is builded by the {@link #build()}
+     * method, this builder is also built and unknown node is added
+     * as child to the product of this builder.
      *
-     * @param unknownNode
+     * @param unknownNode an unknown node builder
      */
     void addUnknownNodeBuilder(UnknownSchemaNodeBuilder unknownNode);