X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fbuilder%2Fapi%2FBuilder.java;h=5270396c579cc6662c60241e2e01e810d6366ac4;hb=448c005a625dd6ae602cd15e36404571da6c1a37;hp=1f1052bb5a07d67deaea7b09048e9e8abbf02bd4;hpb=e5fb69f742a7a98f4767e630b819051d6d7d9153;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/Builder.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/Builder.java index 1f1052bb5a..5270396c57 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/Builder.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/Builder.java @@ -8,16 +8,16 @@ 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. */ -public interface Builder { +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 */ @@ -27,18 +27,21 @@ public interface Builder { * Set name of module in which this node is declared. * * @param moduleName + * @deprecated Module name should be set during creation of builder. */ + @Deprecated 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,7 +56,11 @@ 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 */