2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.builder.api;
10 import java.util.List;
11 import org.opendaylight.yangtools.concepts.Mutable;
14 * Parent interface for all builder interfaces.
16 * @deprecated Pre-Beryllium implementation, scheduled for removal.
19 public interface Builder extends Mutable {
22 * Returns name of module in which node created by this builder
27 String getModuleName();
30 * Get current line in yang file, on which statement
31 * associated with this builder was declared.
33 * @return current line in yang file
38 * Returns parent node builder of this node.
40 * @return parent node builder or null if this is top level node
45 * Set parent of this node.
50 void setParent(Builder parent);
53 * Adds an unknown node builder to this builder.
55 * When product (child) is builded by the {@link #build()}
56 * method, this builder is also built and unknown node is added
57 * as child to the product of this builder.
59 * @param unknownNode an unknown node builder
61 void addUnknownNodeBuilder(UnknownSchemaNodeBuilder unknownNode);
64 * Get builders of unknown nodes defined in this node.
66 * @return collection of UnknownSchemaNodeBuilder objects
68 List<UnknownSchemaNodeBuilder> getUnknownNodes();
71 * Build YANG data model node.
73 * This method should create an instance of YANG data model node. After
74 * creating an instance, this instance should be returned for each call
75 * without repeating build process.
77 * @return YANG data model node