BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / TypeAwareBuilder.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.builder.api;
9
10 import org.opendaylight.yangtools.yang.common.QName;
11 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
12 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13
14 /**
15  * Builder for nodes, which can have 'type' statement must implement this
16  * interface. [typedef, type, leaf, leaf-list, deviate]
17  *
18  * @deprecated Pre-Beryllium implementation, scheduled for removal.
19  */
20 @Deprecated
21 public interface TypeAwareBuilder extends Builder {
22
23     QName getTypeQName();
24
25     void setTypeQName(QName qname);
26
27     /**
28      * Get qname of this node.
29      *
30      * @return QName of this node
31      */
32     QName getQName();
33
34     /**
35      * Get schema path of this node.
36      *
37      * @return SchemaPath of this node
38      */
39     SchemaPath getPath();
40
41     /**
42      * Get resolved type of this node.
43      *
44      * @return type of this node if it is already resolved, null otherwise
45      */
46     TypeDefinition<?> getType();
47
48     /**
49      * Get builder of type of this node.
50      *
51      * @return builder of type of this node or null of this builder has already
52      *         resolved type
53      */
54     TypeDefinitionBuilder getTypedef();
55
56     /**
57      * Set resolved type to this node.
58      *
59      * @param type
60      *            type to set
61      */
62     void setType(TypeDefinition<?> type);
63
64     /**
65      * Set builder of type to this node.
66      *
67      * @param typedef
68      *            builder of type to set
69      */
70     void setTypedef(TypeDefinitionBuilder typedef);
71
72 }