Extended binding-model-api to support of Enclosed Generated Types and TOs.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-model-api / src / main / java / org / opendaylight / controller / sal / binding / model / api / type / builder / EnumBuilder.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.controller.sal.binding.model.api.type.builder;
9
10 import org.opendaylight.controller.sal.binding.model.api.Enumeration;
11 import org.opendaylight.controller.sal.binding.model.api.Type;
12
13 /**
14  * Enum Builder is interface that contains methods to build and instantiate
15  * Enumeration definition.
16  *
17  * @see Enumeration
18  */
19 public interface EnumBuilder extends Type {
20
21     /**
22      * The method creates new AnnotationTypeBuilder containing specified
23      * package name an annotation name.
24      * <br>
25      * Neither the package name or annotation name can contain
26      * <code>null</code> references. In case that
27      * any of parameters contains <code>null</code> the method SHOULD thrown
28      * {@link IllegalArgumentException}
29      *
30      * @param packageName Package Name of Annotation Type
31      * @param name Name of Annotation Type
32      * @return <code>new</code> instance of Annotation Type Builder.
33      */
34     public AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
35
36     /**
37      *
38      * @param name
39      * @param value
40      */
41     public void addValue(final String name, final Integer value);
42
43     /**
44      *
45      * @param definingType
46      * @return
47      */
48     public Enumeration toInstance(final Type definingType);
49 }