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.mdsal.binding.model.api.type.builder;
10 import org.opendaylight.mdsal.binding.model.api.Enumeration;
11 import org.opendaylight.mdsal.binding.model.api.Type;
12 import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
15 * Enum Builder is interface that contains methods to build and instantiate
16 * Enumeration definition.
20 public interface EnumBuilder extends Type {
23 * The method creates new AnnotationTypeBuilder containing specified package
24 * name an annotation name. <br>
25 * Neither the package name or annotation name can contain <code>null</code>
26 * references. In case that any of parameters contains <code>null</code> the
27 * method SHOULD thrown {@link IllegalArgumentException}
30 * Package Name of Annotation Type
32 * Name of Annotation Type
33 * @return <code>new</code> instance of Annotation Type Builder.
35 AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
42 Enumeration toInstance(final Type definingType);
45 * Updates this builder with data from <code>enumTypeDef</code>.
46 * Specifically this data represents list of value-name pairs.
49 * enum type definition as source of enum data for
50 * <code>enumBuilder</code>
52 void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
57 void setDescription(final String description);