Code refactoring
[yangtools.git] / code-generator / binding-model-api / src / main / java / org / opendaylight / yangtools / sal / binding / model / api / type / builder / EnumBuilder.java
index 4342cb93d1c76f244a314f79405bd6875b69fb8e..71a36caf32389ff46880627d5d0083e53e02c162 100644 (file)
@@ -9,41 +9,53 @@ package org.opendaylight.yangtools.sal.binding.model.api.type.builder;
 
 import org.opendaylight.yangtools.sal.binding.model.api.Enumeration;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
 
 /**
  * Enum Builder is interface that contains methods to build and instantiate
  * Enumeration definition.
- *
+ * 
  * @see Enumeration
  */
 public interface EnumBuilder extends Type {
 
     /**
-     * The method creates new AnnotationTypeBuilder containing specified
-     * package name an annotation name.
-     * <br>
-     * Neither the package name or annotation name can contain
-     * <code>null</code> references. In case that
-     * any of parameters contains <code>null</code> the method SHOULD thrown
-     * {@link IllegalArgumentException}
-     *
-     * @param packageName Package Name of Annotation Type
-     * @param name Name of Annotation Type
+     * The method creates new AnnotationTypeBuilder containing specified package
+     * name an annotation name. <br>
+     * Neither the package name or annotation name can contain <code>null</code>
+     * references. In case that any of parameters contains <code>null</code> the
+     * method SHOULD thrown {@link IllegalArgumentException}
+     * 
+     * @param packageName
+     *            Package Name of Annotation Type
+     * @param name
+     *            Name of Annotation Type
      * @return <code>new</code> instance of Annotation Type Builder.
      */
     public AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
 
     /**
-     *
+     * 
      * @param name
      * @param value
      */
     public void addValue(final String name, final Integer value);
 
     /**
-     *
+     * 
      * @param definingType
      * @return
      */
     public Enumeration toInstance(final Type definingType);
+
+    /**
+     * Updates this builder with data from <code>enumTypeDef</code>.
+     * Specifically this data represents list of value-name pairs.
+     * 
+     * @param enumTypeDef
+     *            enum type definition as source of enum data for
+     *            <code>enumBuilder</code>
+     */
+    public void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
+
 }