diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
index d0ac3b6..d48c4f9 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/GeneratedJavaFileType.java
@@ -27,16 +27,6 @@
     public static final int INTERFACE_MASK = 1;
 
     /**
-     * Builder interface file.
-     */
-    public static final int BUILDER_INTERFACE_MASK = 2;
-
-    /**
-     * Builder class file.
-     */
-    public static final int BUILDER_CLASS_MASK = 4;
-
-    /**
      * Impl class file.
      */
     public static final int DEFAULT_CLASS_MASK = 8;
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
index 766e70e..6a78c25 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaCodeFragmentFiles.java
@@ -28,7 +28,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPE_CLASS;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
 
 /**
  * Represents implementation of java code fragments temporary implementations.
@@ -196,20 +195,6 @@
     }
 
     /**
-     * Adds build method for interface.
-     *
-     * @return build method for interface
-     * @throws IOException when fails to append to temporary file
-     */
-    public String addBuildMethodForInterface()
-            throws IOException {
-        if (beanTempFiles != null) {
-            return beanTempFiles.addBuildMethodForInterface();
-        }
-        throw new TranslatorException("build method only supported for bean class");
-    }
-
-    /**
      * Adds default constructor for class.
      *
      * @param modifier modifier for constructor.
@@ -220,9 +205,7 @@
     public String addDefaultConstructor(String modifier, String toAppend)
             throws IOException {
         boolean isSuffix = false;
-        if (toAppend.equals(BUILDER)) {
-            isSuffix = true;
-        }
+
         if (typeTempFiles != null) {
             return typeTempFiles.addDefaultConstructor(modifier, toAppend,
                                                        isSuffix);
@@ -236,20 +219,6 @@
     }
 
     /**
-     * Adds build method's implementation for class.
-     *
-     * @return build method implementation for class
-     * @throws IOException when fails to append to temporary file
-     */
-    public String addBuildMethodImpl()
-            throws IOException {
-        if (beanTempFiles != null) {
-            return beanTempFiles.addBuildMethodImpl();
-        }
-        throw new TranslatorException("build should not be added");
-    }
-
-    /**
      * Removes all temporary file handles.
      * when translator fails to generate java files we need to close
      * all open file handles include temporary files and java files
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
index 426806a..b88ce13 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaFragmentFiles.java
@@ -44,10 +44,9 @@
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.getParentNodeInGenCode;
 import static org.onosproject.yang.compiler.datamodel.utils.builtindatatype.YangDataTypes.BITS;
 import static org.onosproject.yang.compiler.datamodel.utils.builtindatatype.YangDataTypes.IDENTITYREF;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.DEFAULT_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_INTERFACE_WITH_BUILDER;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPE_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.INTERFACE_MASK;
@@ -71,8 +70,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.javamodel.AttributesJavaDataType.updateJavaFileInfo;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaCodeSnippetGen.generateEnumAttributeString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaCodeSnippetGen.getJavaAttributeDefinition;
-import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateBuilderClassFile;
-import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateBuilderInterfaceFile;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateDefaultClassFile;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateInterfaceFile;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateKeyClassFile;
@@ -80,7 +77,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaIdentifierSyntax.createPackage;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getAddToListMethodImpl;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getAddToListMethodInterface;
-import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getBuildString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getDefaultConstructorString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getEqualsMethod;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getFromStringMethod;
@@ -91,7 +87,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getSetterString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getToStringMethod;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getYangDataStructure;
-import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.parseBuilderInterfaceBuildMethodString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getImportString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getOverRideString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorErrorType.INVALID_LEAF_HOLDER;
@@ -101,7 +96,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorUtils.getBeanFiles;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorUtils.getErrorMsg;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIT_SET;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLASS_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT;
@@ -113,7 +107,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.FOUR_SPACE_INDENTATION;
 import static org.onosproject.yang.compiler.utils.UtilConstants.GOOGLE_MORE_OBJECT_IMPORT_CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.GOOGLE_MORE_OBJECT_IMPORT_PKG;
-import static org.onosproject.yang.compiler.utils.UtilConstants.INTERFACE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_OBJECTS_IMPORT_CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_UTIL_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.KEYS;
@@ -134,13 +127,13 @@
 import static org.onosproject.yang.compiler.utils.io.impl.FileSystemUtil.readAppendFile;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.ADD_TO_LIST;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.GETTER_METHOD;
+import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.SETTER_METHOD;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDoc;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getPackageDirPathFromJavaJPackage;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.insertDataIntoJavaFile;
-import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.mergeJavaFiles;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.validateLineLength;
 
 /**
@@ -257,16 +250,6 @@
      */
     private static final String INTERFACE_FILE_NAME_SUFFIX = EMPTY_STRING;
 
-    /**
-     * File name for builder interface file name suffix.
-     */
-    private static final String BUILDER_INTERFACE_FILE_NAME_SUFFIX =
-            BUILDER + INTERFACE;
-
-    /**
-     * File name for builder class file name suffix.
-     */
-    private static final String BUILDER_CLASS_FILE_NAME_SUFFIX = BUILDER;
 
     /**
      * File name for list key class file name suffix.
@@ -311,16 +294,6 @@
     private File interfaceJavaFileHandle;
 
     /**
-     * Java file handle for builder interface file.
-     */
-    private File builderInterfaceJavaFileHandle;
-
-    /**
-     * Java file handle for builder class file.
-     */
-    private File builderClassJavaFileHandle;
-
-    /**
      * Java file handle for impl class file.
      */
     private File implClassJavaFileHandle;
@@ -434,22 +407,7 @@
                                          ADD_TO_LIST_INTERFACE_MASK |
                                          LEAF_IDENTIFIER_ENUM_ATTRIBUTES_MASK);
         }
-        /*
-         * Initialize getter and setter when generation file type matches to
-         * builder interface mask.
-         */
-        if (javaFlagSet(BUILDER_INTERFACE_MASK)) {
-            addGeneratedTempFile(GETTER_FOR_INTERFACE_MASK |
-                                         SETTER_FOR_INTERFACE_MASK);
-        }
-        /*
-         * Initialize getterImpl, setterImpl and attributes when generation file
-         * type matches to builder class mask.
-         */
-        if (javaFlagSet(BUILDER_CLASS_MASK)) {
-            addGeneratedTempFile(ATTRIBUTES_MASK | GETTER_FOR_CLASS_MASK |
-                                         SETTER_FOR_CLASS_MASK);
-        }
+
         /*
          * Initialize getterImpl, attributes, constructor, hash code, equals and
          * to strings when generation file type matches to impl class mask.
@@ -457,6 +415,7 @@
         if (javaFlagSet(DEFAULT_CLASS_MASK)) {
             addGeneratedTempFile(
                     ATTRIBUTES_MASK | GETTER_FOR_CLASS_MASK |
+                            SETTER_FOR_CLASS_MASK |
                             HASH_CODE_IMPL_MASK | EQUALS_IMPL_MASK |
                             TO_STRING_IMPL_MASK | ADD_TO_LIST_IMPL_MASK);
         }
@@ -465,6 +424,7 @@
          */
         if (javaFlagSet(GENERATE_TYPE_CLASS)) {
             addGeneratedTempFile(ATTRIBUTES_MASK | GETTER_FOR_CLASS_MASK |
+                                         SETTER_FOR_CLASS_MASK |
                                          HASH_CODE_IMPL_MASK | EQUALS_IMPL_MASK |
                                          FROM_STRING_IMPL_MASK);
 
@@ -1037,10 +997,25 @@
      */
     private void addSetterImpl(JavaAttributeInfo attr)
             throws IOException {
+        int generatedJavaFiles = getGeneratedJavaFiles();
         String setter = getSetterForClass(attr, getGeneratedJavaClassName(),
-                                          getGeneratedJavaFiles());
-        String javadoc = getOverRideString();
-        appendToFile(setterImplTempFileHandle, javadoc + setter);
+                                          generatedJavaFiles);
+        YangDataStructure ds = getYangDataStructure(
+                attr.getCompilerAnnotation());
+        String annotation = null;
+        if (ds != null) {
+            annotation = ds.name();
+        }
+        String javaDoc;
+        if (generatedJavaFiles != GENERATE_TYPEDEF_CLASS &&
+                generatedJavaFiles != GENERATE_UNION_CLASS) {
+            javaDoc = getOverRideString();
+        } else {
+            javaDoc = getJavaDoc(SETTER_METHOD, attr.getAttributeName(),
+                                 false, annotation);
+        }
+        appendToFile(setterImplTempFileHandle,
+                     javaDoc + setter);
     }
 
     /**
@@ -1051,21 +1026,23 @@
      */
     protected void addGetterImpl(JavaAttributeInfo attr)
             throws IOException {
+        int generatedJavaFiles = getGeneratedJavaFiles();
         String getter = getGetterForClass(attr, getGeneratedJavaFiles());
-        String javadoc = getOverRideString();
         YangDataStructure ds = getYangDataStructure(
                 attr.getCompilerAnnotation());
         String annotation = null;
         if (ds != null) {
             annotation = ds.name();
         }
-        if (javaFlagSet(BUILDER_CLASS_MASK)) {
-            appendToFile(getterImplTempFileHandle, javadoc + getter);
+        String javaDoc;
+        if (generatedJavaFiles != GENERATE_TYPEDEF_CLASS &&
+                generatedJavaFiles != GENERATE_UNION_CLASS) {
+            javaDoc = getOverRideString();
         } else {
-            appendToFile(getterImplTempFileHandle,
-                         getJavaDoc(GETTER_METHOD, attr.getAttributeName(),
-                                    false, annotation) + getter);
+            javaDoc = getJavaDoc(GETTER_METHOD, attr.getAttributeName(),
+                                 false, annotation);
         }
+        appendToFile(getterImplTempFileHandle, javaDoc + getter);
     }
 
     /**
@@ -1115,29 +1092,6 @@
     }
 
     /**
-     * Adds build method for interface.
-     *
-     * @return build method for interface
-     * @throws IOException when fails to append to temporary file
-     */
-    protected String addBuildMethodForInterface()
-            throws IOException {
-        return parseBuilderInterfaceBuildMethodString(
-                getGeneratedJavaClassName());
-    }
-
-    /**
-     * Adds build method's implementation for class.
-     *
-     * @return build method implementation for class
-     * @throws IOException when fails to append to temporary file
-     */
-    protected String addBuildMethodImpl()
-            throws IOException {
-        return getBuildString(getGeneratedJavaClassName(), rootNode) + NEW_LINE;
-    }
-
-    /**
      * Adds default constructor for class.
      *
      * @param modifier modifier for constructor
@@ -1151,7 +1105,7 @@
             throws IOException {
         StringBuilder name = new StringBuilder();
         name.append(getGeneratedJavaClassName());
-        if (rootNode && !toAppend.equals(BUILDER)) {
+        if (rootNode) {
             name.append(OP_PARAM);
             return getDefaultConstructorString(name.toString(), modifier);
         }
@@ -1632,8 +1586,7 @@
         createPackage(curNode);
 
         //Generate java code.
-        if ((fileType & INTERFACE_MASK) != 0 ||
-                (fileType & BUILDER_INTERFACE_MASK) != 0) {
+        if ((fileType & INTERFACE_MASK) != 0) {
 
             //Create interface file.
             interfaceJavaFileHandle =
@@ -1642,23 +1595,6 @@
                     generateInterfaceFile(interfaceJavaFileHandle, imports,
                                           curNode, isAttributePresent);
 
-            //Create builder interface file.
-            if ((fileType & BUILDER_INTERFACE_MASK) != 0) {
-                builderInterfaceJavaFileHandle =
-                        getJavaFileHandle(getJavaClassName(
-                                BUILDER_INTERFACE_FILE_NAME_SUFFIX));
-                builderInterfaceJavaFileHandle =
-                        generateBuilderInterfaceFile(
-                                builderInterfaceJavaFileHandle,
-                                curNode, isAttributePresent);
-                    /*
-                     * Append builder interface file to interface file and
-                     * close it.
-                     */
-                mergeJavaFiles(builderInterfaceJavaFileHandle,
-                               interfaceJavaFileHandle);
-            }
-
             insertDataIntoJavaFile(interfaceJavaFileHandle, CLOSE_CURLY_BRACKET);
             validateLineLength(interfaceJavaFileHandle);
         }
@@ -1670,6 +1606,7 @@
         }
 
         if ((fileType & DEFAULT_CLASS_MASK) != 0) {
+
             //add model object to extend list
             JavaQualifiedTypeInfoTranslator typeInfo = new
                     JavaQualifiedTypeInfoTranslator();
@@ -1679,10 +1616,6 @@
             typeInfo.setQualified(false);
             getBeanFiles(curNode).getJavaExtendsListHolder()
                     .addToExtendsList(typeInfo, curNode, getBeanFiles(curNode));
-        }
-
-        if ((fileType & BUILDER_CLASS_MASK) != 0 ||
-                (fileType & DEFAULT_CLASS_MASK) != 0) {
 
             //Create impl class file.
             implClassJavaFileHandle =
@@ -1692,21 +1625,6 @@
                                              curNode, isAttributePresent,
                                              imports);
 
-            //Create builder class file.
-            if ((fileType & BUILDER_CLASS_MASK) != 0) {
-                builderClassJavaFileHandle =
-                        getJavaFileHandle(getJavaClassName(
-                                BUILDER_CLASS_FILE_NAME_SUFFIX));
-                builderClassJavaFileHandle =
-                        generateBuilderClassFile(builderClassJavaFileHandle,
-                                                 curNode,
-                                                 isAttributePresent);
-
-                //Append impl class to builder class and close it.
-                mergeJavaFiles(builderClassJavaFileHandle,
-                               implClassJavaFileHandle);
-            }
-
             insertDataIntoJavaFile(implClassJavaFileHandle, CLOSE_CURLY_BRACKET);
             validateLineLength(implClassJavaFileHandle);
         }
@@ -1751,12 +1669,7 @@
         if (javaFlagSet(INTERFACE_MASK)) {
             closeFile(interfaceJavaFileHandle, errorOccurred);
         }
-        if (javaFlagSet(BUILDER_CLASS_MASK)) {
-            closeFile(builderClassJavaFileHandle);
-        }
-        if (javaFlagSet(BUILDER_INTERFACE_MASK)) {
-            closeFile(builderInterfaceJavaFileHandle);
-        }
+
         if (javaFlagSet(DEFAULT_CLASS_MASK)) {
             closeFile(implClassJavaFileHandle, errorOccurred);
         }
@@ -1766,6 +1679,9 @@
         if (tempFlagSet(GETTER_FOR_CLASS_MASK)) {
             closeFile(getterImplTempFileHandle);
         }
+        if (tempFlagSet(SETTER_FOR_CLASS_MASK)) {
+            closeFile(setterImplTempFileHandle);
+        }
         if (tempFlagSet(ATTRIBUTES_MASK)) {
             closeFile(attributesTempFileHandle);
         }
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
index 896426a..db01b11 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/ClassDefinitionGenerator.java
@@ -17,7 +17,6 @@
 package org.onosproject.yang.compiler.translator.tojava.utils;
 
 import org.onosproject.yang.compiler.datamodel.RpcNotificationContainer;
-import org.onosproject.yang.compiler.datamodel.YangAugment;
 import org.onosproject.yang.compiler.datamodel.YangCase;
 import org.onosproject.yang.compiler.datamodel.YangIdentity;
 import org.onosproject.yang.compiler.datamodel.YangNode;
@@ -28,8 +27,6 @@
 import org.onosproject.yang.compiler.translator.tojava.JavaQualifiedTypeInfoTranslator;
 import org.onosproject.yang.compiler.translator.tojava.TempJavaCodeFragmentFilesContainer;
 
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.DEFAULT_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ENUM_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
@@ -43,7 +40,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.utils.BracketType.OPEN_CLOSE_DIAMOND_WITH_VALUE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.brackets;
-import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getBuilderImplStringClassDef;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinition;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinitionWithExtends;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getDefaultDefinitionWithImpl;
@@ -55,7 +51,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getSuffixedName;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ABSTRACT_EVENT;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMPARABLE;
@@ -80,7 +75,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
-import static org.onosproject.yang.compiler.utils.UtilConstants.STATIC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SUBJECT;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.trimAtLast;
@@ -139,12 +133,8 @@
         switch (genFileTypes) {
             case INTERFACE_MASK:
                 return getInterfaceDefinition(yangName, curNode);
-            case BUILDER_CLASS_MASK:
-                return getBuilderClassDefinition(yangName, curNode);
             case DEFAULT_CLASS_MASK:
                 return getImplClassDefinition(yangName, curNode);
-            case BUILDER_INTERFACE_MASK:
-                return getBuilderInterfaceDefinition(yangName, curNode);
             case GENERATE_SERVICE_AND_MANAGER:
                 return getRpcInterfaceDefinition(yangName, curNode);
             case GENERATE_EVENT_CLASS:
@@ -191,48 +181,6 @@
     }
 
     /**
-     * Returns builder interface file class definition.
-     *
-     * @param yangName java class name, corresponding to which the builder
-     *                 class is being generated
-     * @return definition
-     */
-    private static String getBuilderInterfaceDefinition(String yangName,
-                                                        YangNode curNode) {
-        if (!(curNode instanceof YangCase) &&
-                !(curNode instanceof YangAugment)) {
-            String clsDef = getClassDefinitionForWhenExtended(
-                    curNode, yangName, BUILDER_INTERFACE_MASK);
-            if (clsDef != null) {
-                return clsDef;
-            }
-        }
-        return getDefaultDefinition(INTERFACE, getSuffixedName(yangName, BUILDER),
-                                    null);
-    }
-
-    /**
-     * Returns builder file class definition.
-     *
-     * @param yangName file name
-     * @return definition
-     */
-    private static String getBuilderClassDefinition(String yangName,
-                                                    YangNode curNode) {
-        String mod = getSpecificModifier(PUBLIC, STATIC);
-        String bName = getSuffixedName(yangName, BUILDER);
-        if (!(curNode instanceof YangCase)) {
-            String clsDef = getClassDefinitionForWhenExtended(curNode, yangName,
-                                                              BUILDER_CLASS_MASK);
-            if (clsDef != null) {
-                return clsDef;
-            }
-        }
-        return getDefaultDefinitionWithImpl(CLASS, bName, mod,
-                                            getBuilderImplStringClassDef(yangName));
-    }
-
-    /**
      * Returns impl file class definition.
      *
      * @param yangName file name
@@ -403,31 +351,6 @@
                     def = new StringBuilder(getDefinitionString(def.toString(),
                                                                 holder));
                     break;
-                case BUILDER_INTERFACE_MASK:
-                    def.append(INTERFACE)
-                            .append(SPACE).append(yangName).append(BUILDER)
-                            .append(SPACE).append(EXTEND).append(SPACE);
-                    def = new StringBuilder(getDefinitionString(
-                            def.toString(), holder));
-                    break;
-                case BUILDER_CLASS_MASK:
-                    boolean isModelObject = false;
-                    for (JavaQualifiedTypeInfoTranslator info : holder.getExtendsList()) {
-                        if (info.getClassInfo().equals(MODEL_OBJECT)) {
-                            isModelObject = true;
-                        }
-                    }
-                    def.append(STATIC).append(SPACE).append(CLASS)
-                            .append(SPACE).append(yangName).append(BUILDER);
-                    if (!isModelObject) {
-                        def.append(SPACE).append(EXTEND).append(SPACE);
-                        def = new StringBuilder(getDefinitionString(def.toString(),
-                                                                    holder));
-                    }
-                    def.append(SPACE).append(IMPLEMENTS).append(SPACE)
-                            .append(yangName).append(PERIOD)
-                            .append(yangName).append(BUILDER);
-                    break;
                 case DEFAULT_CLASS_MASK:
 
                     // class defination
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
index b9c609e..e886af2 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGenerator.java
@@ -42,8 +42,6 @@
 import java.util.List;
 
 import static java.util.Collections.sort;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.DEFAULT_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ENUM_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
@@ -54,11 +52,8 @@
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.INTERFACE_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.ADD_TO_LIST_IMPL_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.ADD_TO_LIST_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.ATTRIBUTES_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.CONSTRUCTOR_FOR_TYPE_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.CONSTRUCTOR_IMPL_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.ENUM_IMPL_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.EQUALS_IMPL_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedTempFileType.EVENT_ENUM_MASK;
@@ -89,14 +84,12 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGeneratorUtils.initiateJavaFileGeneration;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodBodyTypes.ENUM_METHOD_INT_VALUE;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodBodyTypes.ENUM_METHOD_STRING_VALUE;
-import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.builderMethod;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getAddAugmentationString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getAugmentationString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getAugmentationsString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getBitSetEnumClassFromString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getBitSetEnumClassToString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getCompareToForKeyClass;
-import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getConstructorStart;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getEnumsConstructor;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getEnumsOfValueMethod;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getEqualsMethod;
@@ -128,9 +121,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorUtils.getBeanFiles;
 import static org.onosproject.yang.compiler.translator.tojava.utils.TranslatorUtils.getTypeFiles;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIG_INTEGER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER_CLASS;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER_INTERFACE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLOSE_CURLY_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMMA;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT;
@@ -237,6 +227,9 @@
                 //Getter methods.
                 insertDataIntoJavaFile(file, getDataFromTempFileHandle(
                         GETTER_FOR_INTERFACE_MASK, getBeanFiles(curNode), path));
+
+                insertDataIntoJavaFile(file, getDataFromTempFileHandle(
+                        SETTER_FOR_INTERFACE_MASK, getBeanFiles(curNode), path));
             } catch (IOException e) {
                 throw new IOException(getErrorMsg(className, INTERFACE));
             }
@@ -252,161 +245,6 @@
     }
 
     /**
-     * Returns generated builder interface file for current node.
-     *
-     * @param file        file
-     * @param curNode     current YANG node
-     * @param attrPresent if any attribute is present or not
-     * @return builder interface file
-     * @throws IOException when fails to write in file
-     */
-    public static File generateBuilderInterfaceFile(File file, YangNode curNode,
-                                                    boolean attrPresent)
-            throws IOException {
-
-        JavaFileInfoTranslator fileInfo =
-                ((JavaFileInfoContainer) curNode).getJavaFileInfo();
-
-        boolean leavesPresent;
-        YangLeavesHolder leavesHolder;
-        if (curNode instanceof YangLeavesHolder &&
-                curNode.isOpTypeReq()) {
-            leavesHolder = (YangLeavesHolder) curNode;
-            leavesPresent = leavesPresent(leavesHolder);
-        } else {
-            leavesPresent = false;
-        }
-
-        String className = getCapitalCase(fileInfo.getJavaName());
-        String path;
-        if (curNode instanceof RpcNotificationContainer) {
-            path = fileInfo.getPluginConfig().getCodeGenDir() +
-                    fileInfo.getPackageFilePath();
-        } else {
-            path = fileInfo.getBaseCodeGenPath() +
-                    fileInfo.getPackageFilePath();
-        }
-
-        initiateJavaFileGeneration(file, BUILDER_INTERFACE_MASK, null, curNode,
-                                   className);
-        List<String> methods = new ArrayList<>();
-        if (attrPresent) {
-            try {
-                //Getter methods.
-                methods.add(getDataFromTempFileHandle(
-                        GETTER_FOR_INTERFACE_MASK,
-                        getBeanFiles(curNode), path));
-
-                //Setter methods.
-                methods.add(getDataFromTempFileHandle(
-                        SETTER_FOR_INTERFACE_MASK,
-                        getBeanFiles(curNode), path));
-
-                //Add to list method.
-                insertDataIntoJavaFile(file, getDataFromTempFileHandle(
-                        ADD_TO_LIST_INTERFACE_MASK, getBeanFiles(curNode), path));
-            } catch (IOException e) {
-                throw new IOException(getErrorMsg(className, BUILDER_INTERFACE));
-            }
-        }
-
-        //Add build method to builder interface file.
-        methods.add(((TempJavaCodeFragmentFilesContainer) curNode)
-                            .getTempJavaCodeFragmentFiles()
-                            .addBuildMethodForInterface());
-
-        //Add getters and setters in builder interface.
-        for (String method : methods) {
-            insertDataIntoJavaFile(file, method);
-        }
-
-        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET + NEW_LINE);
-        return file;
-    }
-
-    /**
-     * Returns generated builder class file for current node.
-     *
-     * @param file        file
-     * @param curNode     current YANG node
-     * @param attrPresent if any attribute is present or not
-     * @return builder class file
-     * @throws IOException when fails to write in file
-     */
-    public static File generateBuilderClassFile(File file, YangNode curNode,
-                                                boolean attrPresent)
-            throws IOException {
-
-        JavaFileInfoTranslator fileInfo =
-                ((JavaFileInfoContainer) curNode).getJavaFileInfo();
-
-        boolean leavesPresent;
-        YangLeavesHolder leavesHolder;
-        if (curNode instanceof YangLeavesHolder) {
-            leavesHolder = (YangLeavesHolder) curNode;
-            leavesPresent = leavesPresent(leavesHolder);
-        } else {
-            leavesPresent = false;
-        }
-
-        String className = getCapitalCase(fileInfo.getJavaName());
-        String path;
-        if (curNode instanceof RpcNotificationContainer) {
-            path = fileInfo.getPluginConfig().getCodeGenDir() +
-                    fileInfo.getPackageFilePath();
-        } else {
-            path = fileInfo.getBaseCodeGenPath() +
-                    fileInfo.getPackageFilePath();
-        }
-
-        initiateJavaFileGeneration(file, BUILDER_CLASS_MASK, null, curNode,
-                                   className);
-        List<String> methods = new ArrayList<>();
-        if (attrPresent) {
-
-            //Add attribute strings.
-            try {
-                insertDataIntoJavaFile(file, getDataFromTempFileHandle(
-                        ATTRIBUTES_MASK, getBeanFiles(curNode), path));
-            } catch (IOException e) {
-                throw new IOException(getErrorMsg(className, BUILDER_CLASS));
-            }
-            try {
-                //Getter methods.
-                methods.add(getDataFromTempFileHandle(
-                        GETTER_FOR_CLASS_MASK, getBeanFiles(curNode), path));
-                // Setter methods.
-                methods.add(getDataFromTempFileHandle(
-                        SETTER_FOR_CLASS_MASK, getBeanFiles(curNode), path));
-
-                //Add to list impl method.
-                methods.add(getDataFromTempFileHandle(
-                        ADD_TO_LIST_IMPL_MASK, getBeanFiles(curNode), path));
-
-                insertDataIntoJavaFile(file, NEW_LINE);
-            } catch (IOException e) {
-                throw new IOException(getErrorMsg(className, BUILDER_CLASS));
-            }
-        } else {
-            insertDataIntoJavaFile(file, NEW_LINE);
-        }
-
-        // Add default constructor and build method impl.
-        methods.add(((TempJavaCodeFragmentFilesContainer) curNode)
-                            .getTempJavaCodeFragmentFiles()
-                            .addBuildMethodImpl());
-
-        methods.add(addDefaultConstructor(curNode, PUBLIC, BUILDER));
-
-        //Add methods in builder class.
-        for (String method : methods) {
-            insertDataIntoJavaFile(file, method);
-        }
-        insertDataIntoJavaFile(file, CLOSE_CURLY_BRACKET);
-        return file;
-    }
-
-    /**
      * Returns generated key class file for current list node.
      *
      * @param file    file
@@ -557,20 +395,8 @@
             insertDataIntoJavaFile(file, NEW_LINE);
         }
 
-        try {
-            //Constructor.
-            String constructor = getConstructorStart(className, rootNode) +
-                    getDataFromTempFileHandle(
-                            CONSTRUCTOR_IMPL_MASK, getBeanFiles(curNode), path)
-                    + methodClose(FOUR_SPACE);
-            methods.add(constructor);
-        } catch (IOException e) {
-            throw new IOException(getErrorMsg(className, IMPL_CLASS));
-        }
+        methods.add(addDefaultConstructor(curNode, PUBLIC, DEFAULT));
 
-        methods.add(addDefaultConstructor(curNode, PROTECTED, DEFAULT));
-
-        methods.add(builderMethod(className));
         if (leavesPresent) {
             methods.add(getIsValueLeafSet());
         }
@@ -622,6 +448,10 @@
             methods.add(getDataFromTempFileHandle(
                     GETTER_FOR_CLASS_MASK, getBeanFiles(curNode), path));
 
+            //Getter methods.
+            methods.add(getDataFromTempFileHandle(
+                    SETTER_FOR_CLASS_MASK, getBeanFiles(curNode), path));
+
             // Hash code method.
             methods.add(getHashCodeMethodClose(
                     getHashCodeMethodOpen() + getDataFromTempFileHandle(
@@ -700,6 +530,10 @@
             methods.add(getDataFromTempFileHandle(
                     GETTER_FOR_CLASS_MASK, getTypeFiles(curNode), path));
 
+            //Setter methods.
+            methods.add(getDataFromTempFileHandle(
+                    SETTER_FOR_CLASS_MASK, getTypeFiles(curNode), path));
+
             // Hash code method.
             methods.add(getHashCodeMethodClose(
                     getHashCodeMethodOpen() + getDataFromTempFileHandle(
@@ -843,6 +677,10 @@
             methods.add(getDataFromTempFileHandle(
                     GETTER_FOR_CLASS_MASK, getTypeFiles(curNode), path));
 
+            //Setter methods.
+            methods.add(getDataFromTempFileHandle(
+                    SETTER_FOR_CLASS_MASK, getTypeFiles(curNode), path));
+
             //Hash code method.
             methods.add(getHashCodeMethodClose(
                     getHashCodeMethodOpen() +
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
index 6c1ac6b..6668e2d 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -45,8 +45,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_CLASS_MASK;
-import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.BUILDER_INTERFACE_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.DEFAULT_CLASS_MASK;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_ENUM_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_CLASS;
@@ -96,8 +94,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.SLASH;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
 import static org.onosproject.yang.compiler.utils.io.impl.CopyrightHeader.parseCopyrightHeader;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILDER_CLASS;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILDER_INTERFACE;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.DEFAULT_CLASS;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.ENUM_CLASS;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.EVENT;
@@ -444,12 +440,6 @@
                 write(file, genType, DEFAULT_CLASS, curNode, className,
                       curNode.isOpTypeReq());
                 break;
-            case BUILDER_CLASS_MASK:
-                write(file, genType, BUILDER_CLASS, curNode, className, false);
-                break;
-            case BUILDER_INTERFACE_MASK:
-                write(file, genType, BUILDER_INTERFACE, curNode, className, false);
-                break;
             case GENERATE_SERVICE_AND_MANAGER:
                 appendHeaderContents(file, pkgString, importsList);
                 write(file, genType, RPC_INTERFACE, curNode, className, false);
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodBodyTypes.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodBodyTypes.java
index 2622809..6bcb896 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodBodyTypes.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodBodyTypes.java
@@ -27,9 +27,6 @@
     //Setter method body.
     SETTER,
 
-    //Build method body.
-    BUILD,
-
     //Constructor method body.
     CONSTRUCTOR,
 
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
index e25971f..9c14997 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGenerator.java
@@ -42,6 +42,7 @@
 import static org.onosproject.yang.compiler.datamodel.utils.builtindatatype.YangDataTypes.IDENTITYREF;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_EVENT_SUBJECT_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER;
+import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_TYPEDEF_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.GeneratedJavaFileType.GENERATE_UNION_CLASS;
 import static org.onosproject.yang.compiler.translator.tojava.utils.BracketType.OPEN_CLOSE_BRACKET;
 import static org.onosproject.yang.compiler.translator.tojava.utils.IndentationType.EIGHT_SPACE;
@@ -106,9 +107,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.BITS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIT_SET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BOOLEAN_DATA_TYPE;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILD;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER_LOWER_CASE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CAMEL_CLASS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CASE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CLASS;
@@ -120,7 +118,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMPARE_TO;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DECODE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT;
-import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_CAPS;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DIAMOND_CLOSE_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DIAMOND_OPEN_BRACKET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
@@ -165,7 +162,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.NOT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NULL;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OBJ;
-import static org.onosproject.yang.compiler.utils.UtilConstants.OBJECT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OBJECT_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OF;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OF_CAPS;
@@ -176,11 +172,9 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.OPERATION_TYPE_ATTRIBUTE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OP_PARAM;
 import static org.onosproject.yang.compiler.utils.UtilConstants.OTHER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.OVERRIDE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PRIORITY_QUEUE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PRIVATE;
-import static org.onosproject.yang.compiler.utils.UtilConstants.PROTECTED;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.QUESTION_MARK;
@@ -218,7 +212,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.VARIABLE_C;
 import static org.onosproject.yang.compiler.utils.UtilConstants.VOID;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ZERO;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILD_METHOD;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.CONSTRUCTOR;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.DEFAULT_CONSTRUCTOR;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.FROM_METHOD;
@@ -227,7 +220,6 @@
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.OF_METHOD;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.SETTER_METHOD;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.TYPE_CONSTRUCTOR;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.generateForBuilderMethod;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.generateForGetMethodWithAttribute;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.generateForValidatorMethod;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.getJavaDoc;
@@ -250,17 +242,6 @@
     }
 
     /**
-     * Returns the methods strings for builder interface.
-     *
-     * @param name attribute name
-     * @return method string for builder interface
-     */
-    public static String parseBuilderInterfaceBuildMethodString(String name) {
-        return getJavaDoc(BUILD_METHOD, name, false, null) +
-                getBuildForInterface(name);
-    }
-
-    /**
      * Returns getter string.
      *
      * @param attr    attribute info
@@ -357,18 +338,6 @@
     }
 
     /**
-     * Returns build method string.
-     *
-     * @param name   class name
-     * @param isRoot true if root node
-     * @return build string
-     */
-    public static String getBuildString(String name, boolean isRoot) {
-        return FOUR_SPACE_INDENTATION + OVERRIDE + NEW_LINE +
-                getBuild(name, isRoot);
-    }
-
-    /**
      * Returns add augmentation method string.
      *
      * @return add augmentation string
@@ -532,10 +501,12 @@
                     .append(methodClose(FOUR_SPACE));
             return builder.toString();
         }
-        builder.append(methodSignature(name, EMPTY_STRING,
-                                       PUBLIC, name, getCapitalCase(className) +
-                                               BUILDER, type, CLASS_TYPE));
-        if (!isTypeNull && !isList) {
+        //Append method signature.
+        builder.append(methodSignature(name, EMPTY_STRING, PUBLIC, name,
+                                       VOID, type, CLASS_TYPE));
+
+        if (!isTypeNull && !isList &&
+                genType != GENERATE_TYPEDEF_CLASS && genType != GENERATE_UNION_CLASS) {
             builder.append(getLeafFlagSetString(name, VALUE_LEAF, EIGHT_SPACE_INDENTATION,
                                                 SET_METHOD_PREFIX)).append(signatureClose());
         } else {
@@ -544,7 +515,7 @@
         //Append method body.
         builder.append(methodBody(SETTER, name, name,
                                   EIGHT_SPACE_INDENTATION, null, null,
-                                  true, null))
+                                  false, null))
                 //Append method close.
                 .append(methodClose(FOUR_SPACE));
         return builder.toString();
@@ -655,13 +626,12 @@
                                                    String attrType,
                                                    int genType) {
         if (genType == GENERATE_SERVICE_AND_MANAGER) {
-            return methodSignature(getCapitalCase(attrName),
-                                   SET_METHOD_PREFIX,
-                                   null, attrName, VOID, attrType +
-                                           OP_PARAM, INTERFACE_TYPE);
+            return methodSignature(getCapitalCase(attrName), SET_METHOD_PREFIX,
+                                   null, attrName, VOID, attrType + OP_PARAM,
+                                   INTERFACE_TYPE);
         }
         return methodSignature(attrName, EMPTY_STRING, null,
-                               attrName, name + BUILDER, attrType, INTERFACE_TYPE);
+                               attrName, VOID, attrType, INTERFACE_TYPE);
     }
 
     /**
@@ -689,40 +659,6 @@
     }
 
     /**
-     * Returns the build method strings for interface file.
-     *
-     * @param yangName name of the interface
-     * @return build method for interface
-     */
-    static String getBuildForInterface(String yangName) {
-        return methodSignature(BUILD, EMPTY_STRING, null, null,
-                               yangName, null, INTERFACE_TYPE);
-    }
-
-    /**
-     * Returns constructor string for impl class.
-     *
-     * @param yangName   class name
-     * @param isRootNode if root node
-     * @return constructor string
-     */
-    static String getConstructorStart(String yangName,
-                                      boolean isRootNode) {
-        StringBuilder builder = new StringBuilder(
-                getConstructorString(yangName));
-
-        String name = getCapitalCase(yangName);
-        String returnType = DEFAULT_CAPS + name;
-        if (isRootNode) {
-            returnType = name + OP_PARAM;
-        }
-        builder.append(methodSignature(
-                returnType, EMPTY_STRING, PROTECTED, BUILDER_LOWER_CASE + OBJECT,
-                null, name + BUILDER, CLASS_TYPE));
-        return builder.toString();
-    }
-
-    /**
      * Returns the constructor strings for class file.
      *
      * @param attr    attribute info
@@ -738,7 +674,7 @@
                                   attrCaps, EIGHT_SPACE_INDENTATION, GET, null,
                                   false, null);
             default:
-                return methodBody(MethodBodyTypes.CONSTRUCTOR, attrName,
+                return methodBody(MethodBodyTypes.DEFAULT_CONSTRUCTOR, null,
                                   attrName, EIGHT_SPACE_INDENTATION, EMPTY_STRING,
                                   null, false, null);
         }
@@ -764,27 +700,6 @@
     }
 
     /**
-     * Returns the build method strings for class file.
-     *
-     * @param yangName   class name
-     * @param isRootNode if root node
-     * @return build method string for class
-     */
-    static String getBuild(String yangName, boolean isRootNode) {
-        String type = DEFAULT_CAPS + yangName;
-        if (isRootNode) {
-            type = yangName + OP_PARAM;
-        }
-        return methodSignature(BUILD, EMPTY_STRING, PUBLIC, null,
-                               yangName, null,
-                               CLASS_TYPE) +
-                methodBody(MethodBodyTypes.BUILD, type, BUILD,
-                           EIGHT_SPACE_INDENTATION, EMPTY_STRING,
-                           null, false, null) +
-                methodClose(FOUR_SPACE);
-    }
-
-    /**
      * Returns the Default constructor strings for class file.
      *
      * @param name         name of the class
@@ -878,7 +793,7 @@
     static String getToStringMethodClose() {
         return TWELVE_SPACE_INDENTATION + PERIOD + TO_STRING_METHOD +
                 brackets(OPEN_CLOSE_BRACKET, null, null) + signatureClose() +
-                methodClose(FOUR_SPACE);
+                methodClose(FOUR_SPACE) + NEW_LINE;
     }
 
     /**
@@ -1537,16 +1452,16 @@
                     param.put(attr.getAttributeName() + KEYS, retType + KEYS);
                     param.put(attr.getAttributeName() + VALUE_CAPS, retType);
                     return multiAttrMethodSignature(methodName, null, null,
-                                                    className + BUILDER, param,
+                                                    className, param,
                                                     INTERFACE_TYPE);
                 default:
                     return methodSignature(methodName, null, null, ADD_STRING + TO_CAPS,
-                                           className + BUILDER, retType,
+                                           className, retType,
                                            INTERFACE_TYPE);
             }
         }
         return methodSignature(methodName, null, null, ADD_STRING + TO_CAPS,
-                               className + BUILDER, getReturnType(attr),
+                               className, getReturnType(attr),
                                INTERFACE_TYPE);
     }
 
@@ -1590,7 +1505,7 @@
                     param.put(attr.getAttributeName() + VALUE_CAPS, retType);
                     builder.append(multiAttrMethodSignature(methodName,
                                                             null, PUBLIC,
-                                                            name + BUILDER, param,
+                                                            name, param,
                                                             CLASS_TYPE))
                             .append(getIfConditionForAddToListMethod(attr));
                     retString = EIGHT_SPACE_INDENTATION + attrName + PERIOD +
@@ -1602,17 +1517,18 @@
                     builder.append(methodSignature(methodName,
                                                    null, PUBLIC,
                                                    ADD_STRING + TO_CAPS,
-                                                   name + BUILDER, retType,
+                                                   name, retType,
                                                    CLASS_TYPE))
                             .append(getIfConditionForAddToListMethod(attr));
                     retString = EIGHT_SPACE_INDENTATION + attrName + PERIOD + ADD_STRING +
                             OPEN_PARENTHESIS + ADD_STRING + TO_CAPS + CLOSE_PARENTHESIS;
+
             }
         } else {
             builder.append(methodSignature(ADD_STRING + TO_CAPS +
                                                    getCapitalCase(attrName),
                                            null, PUBLIC, ADD_STRING + TO_CAPS,
-                                           name + BUILDER, retType,
+                                           name, retType,
                                            CLASS_TYPE))
                     .append(getIfConditionForAddToListMethod(attr));
             retString = EIGHT_SPACE_INDENTATION + attrName + PERIOD + ADD_STRING +
@@ -1624,6 +1540,7 @@
                 .append(signatureClose())
                 .append(methodClose(FOUR_SPACE));
         return builder.toString();
+
     }
 
     // Returns if condition for add to list method.
@@ -1653,6 +1570,7 @@
                 default:
                     type = ARRAY_LIST_INIT;
                     break;
+
             }
         } else {
             type = ARRAY_LIST_INIT;
@@ -1665,23 +1583,6 @@
     }
 
     /**
-     * Returns builder method for class.
-     *
-     * @param name name of class
-     * @return builder method for class
-     */
-    static String builderMethod(String name) {
-        return generateForBuilderMethod(name) +
-                methodSignature(BUILDER_LOWER_CASE,
-                                EMPTY_STRING, PUBLIC + SPACE +
-                                        STATIC, null, name + BUILDER, null, CLASS_TYPE) +
-                getReturnString(NEW + SPACE + name + BUILDER,
-                                EIGHT_SPACE_INDENTATION) +
-                brackets(OPEN_CLOSE_BRACKET, null, null) + signatureClose() +
-                methodClose(FOUR_SPACE);
-    }
-
-    /**
      * Returns is value set interface.
      *
      * @return is value set interface
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
index d381805..f2cccb8 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/StringGenerator.java
@@ -47,7 +47,6 @@
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodsGenerator.getYangDataStructure;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.AND;
-import static org.onosproject.yang.compiler.utils.UtilConstants.APPEND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.APP_INSTANCE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.AT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BIG_DECIMAL;
@@ -55,8 +54,6 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.BITSET;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BOOLEAN_DATA_TYPE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BOOLEAN_WRAPPER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER;
-import static org.onosproject.yang.compiler.utils.UtilConstants.BUILDER_LOWER_CASE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BYTE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.BYTE_WRAPPER;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CATCH;
@@ -333,13 +330,9 @@
                     builder.append(body);
                 }
                 return builder.toString();
-            case BUILD:
-                return getReturnString(
-                        NEW + SPACE + paraName + getOpenCloseParaWithValue(
-                                THIS) + signatureClose(), space);
             case CONSTRUCTOR:
                 return space + paraName + SPACE +
-                        EQUAL + SPACE + BUILDER_LOWER_CASE + OBJECT + PERIOD +
+                        EQUAL + SPACE + OBJECT + PERIOD +
                         prefix + methodName +
                         brackets(OPEN_CLOSE_BRACKET, null, null) +
                         signatureClose();
@@ -1063,17 +1056,6 @@
     }
 
     /**
-     * Returns builder string for class definition.
-     *
-     * @param yangName class name
-     * @return builder string for class definition
-     */
-    static String getBuilderImplStringClassDef(String yangName) {
-        return new StringBuilder(yangName).append(PERIOD).append(yangName)
-                .append(BUILDER).toString();
-    }
-
-    /**
      * Returns default name string.
      *
      * @param yangName class name
@@ -1139,18 +1121,6 @@
     }
 
     /**
-     * Returns string builder's append string.
-     *
-     * @param append data to be append
-     * @param space  indentation
-     * @return string builder's append string
-     */
-    static String getStringBuilderAppendString(String append, String space) {
-        return space + STRING_BUILDER_VAR + PERIOD + APPEND + OPEN_PARENTHESIS +
-                append + CLOSE_PARENTHESIS + signatureClose();
-    }
-
-    /**
      * Returns pattern quote string.
      *
      * @param type type for pattern is needed
diff --git a/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGeneratorTest.java b/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGeneratorTest.java
index 45fd00e..75ad047 100644
--- a/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGeneratorTest.java
+++ b/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/MethodsGeneratorTest.java
@@ -99,34 +99,6 @@
     }
 
     /**
-     * Test for build method for class.
-     */
-    @Test
-    public void getBuildTest() {
-        String method = MethodsGenerator.getBuild(CLASS_NAME, false);
-        assertThat(true, is(method.equals(
-                UtilConstants.FOUR_SPACE_INDENTATION + UtilConstants.PUBLIC + UtilConstants.SPACE + CLASS_NAME + UtilConstants.SPACE +
-                        UtilConstants.BUILD + UtilConstants.OPEN_PARENTHESIS + UtilConstants.CLOSE_PARENTHESIS + UtilConstants.SPACE +
-                        UtilConstants.OPEN_CURLY_BRACKET + UtilConstants.NEW_LINE + UtilConstants.EIGHT_SPACE_INDENTATION +
-                        UtilConstants.RETURN + UtilConstants.SPACE + UtilConstants.NEW + UtilConstants.SPACE + UtilConstants.DEFAULT_CAPS + CLASS_NAME +
-                        UtilConstants.OPEN_PARENTHESIS + UtilConstants.THIS + UtilConstants.CLOSE_PARENTHESIS +
-                        UtilConstants.SEMI_COLON + UtilConstants.NEW_LINE + UtilConstants.FOUR_SPACE_INDENTATION +
-                        UtilConstants.CLOSE_CURLY_BRACKET + UtilConstants.NEW_LINE)));
-    }
-
-    /**
-     * Test for build method of interface.
-     */
-    @Test
-    public void getBuildForInterfaceTest() {
-        String method = MethodsGenerator.getBuildForInterface(CLASS_NAME);
-        assertThat(true, is(method.equals(
-                UtilConstants.FOUR_SPACE_INDENTATION + CLASS_NAME + UtilConstants.SPACE + UtilConstants.BUILD +
-                        UtilConstants.OPEN_PARENTHESIS + UtilConstants.CLOSE_PARENTHESIS + UtilConstants.SEMI_COLON +
-                        UtilConstants.NEW_LINE)));
-    }
-
-    /**
      * Test for check not null method.
      */
     @Test
@@ -139,34 +111,6 @@
     }
 
     /**
-     * Test case for constructor.
-     */
-    @Test
-    public void getConstructorTest() {
-        JavaAttributeInfo testAttr = getTestAttribute();
-        String method = MethodsGenerator.getConstructor(testAttr, GeneratedJavaFileType.GENERATE_SERVICE_AND_MANAGER
-        );
-        assertThat(true, is(method.contains(
-                ATTRIBUTE_NAME + UtilConstants.SPACE + UtilConstants.EQUAL + UtilConstants.SPACE +
-                        UtilConstants.BUILDER_LOWER_CASE + UtilConstants.OBJECT + UtilConstants.PERIOD +
-                        UtilConstants.GET_METHOD_PREFIX + CLASS_NAME + UtilConstants.OPEN_PARENTHESIS +
-                        UtilConstants.CLOSE_PARENTHESIS + UtilConstants.SEMI_COLON)));
-    }
-
-    /**
-     * Test for constructor start method.
-     */
-    @Test
-    public void getConstructorStartTest() {
-        String method = MethodsGenerator.getConstructorStart(CLASS_NAME, false);
-        assertThat(true, is(method.contains(
-                UtilConstants.PROTECTED + UtilConstants.SPACE + UtilConstants.DEFAULT_CAPS + CLASS_NAME +
-                        UtilConstants.OPEN_PARENTHESIS + CLASS_NAME + UtilConstants.BUILDER + UtilConstants.SPACE +
-                        UtilConstants.BUILDER_LOWER_CASE + UtilConstants.OBJECT + UtilConstants.CLOSE_PARENTHESIS + UtilConstants.SPACE +
-                        UtilConstants.OPEN_CURLY_BRACKET)));
-    }
-
-    /**
      * Test case for equals method.
      */
     @Test
diff --git a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
index 8f5131b..8659dd8 100644
--- a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
+++ b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
@@ -33,12 +33,6 @@
             " * Represents the implementation of ";
 
     /**
-     * JavaDocs for builder class.
-     */
-    public static final String BUILDER_CLASS_JAVA_DOC =
-            " * Represents the builder implementation of ";
-
-    /**
      * JavaDocs for interface class.
      */
     public static final String INTERFACE_JAVA_DOC =
@@ -64,11 +58,6 @@
             " * Abstraction for event listener of ";
 
     /**
-     * JavaDocs for builder interface class.
-     */
-    public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for ";
-
-    /**
      * JavaDocs for enum class.
      */
     public static final String ENUM_CLASS_JAVADOC =
@@ -115,7 +104,7 @@
      * JavaDocs's description for setter method.
      */
     public static final String JAVA_DOC_SETTERS =
-            " * Returns the builder object of ";
+            " * Sets the attribute ";
 
     /**
      * JavaDocs's description for add to list method.
@@ -168,11 +157,6 @@
     public static final String JAVA_DOC_BUILD = " * Builds object of ";
 
     /**
-     * JavaDocs's statement for builder object.
-     */
-    public static final String BUILDER_OBJECT = "builder object of ";
-
-    /**
      * JavaDocs's statement for rpc method.
      */
     public static final String JAVA_DOC_RPC = " * Service interface of ";
@@ -249,11 +233,6 @@
     public static final String ENTRY = "Entry";
 
     /**
-     * Static attribute for period.
-     */
-    public static final String ENTRY_SET = "entrySet()";
-
-    /**
      * Static attribute for compare to.
      */
     public static final String COMPARE_TO = "compareTo";
@@ -1249,16 +1228,6 @@
     public static final String CLASS = "class";
 
     /**
-     * Static attribute for builder syntax.
-     */
-    public static final String BUILDER = "Builder";
-
-    /**
-     * Static attribute for builder syntax.
-     */
-    public static final String BUILDER_LOWER_CASE = "builder";
-
-    /**
      * Static attribute for service syntax.
      */
     public static final String SERVICE = "Service";
@@ -1354,16 +1323,6 @@
     public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
 
     /**
-     * Static attribute for build method syntax.
-     */
-    public static final String BUILD = "build";
-
-    /**
-     * Static attribute for build for filter in augment method syntax.
-     */
-    public static final String BUILD_FOR_FILTER = "buildForFilter";
-
-    /**
      * Static attribute for object.
      */
     public static final String OBJECT = "Object";
@@ -1735,16 +1694,6 @@
     public static final String RPC_CLASS = "rpc class";
 
     /**
-     * Static attribute for builder class.
-     */
-    public static final String BUILDER_CLASS = "builder class";
-
-    /**
-     * Static attribute for builder interface.
-     */
-    public static final String BUILDER_INTERFACE = "builder interface";
-
-    /**
      * Static attribute for bits.
      */
     public static final String BITS = "bits";
diff --git a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
index 07af02e..12256c7 100644
--- a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
+++ b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGen.java
@@ -16,10 +16,59 @@
 
 package org.onosproject.yang.compiler.utils.io.impl;
 
-import org.onosproject.yang.compiler.utils.UtilConstants;
-
-import static org.onosproject.yang.compiler.utils.UtilConstants.*;
-import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.*;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ADD_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ENUM_ATTRIBUTE_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.ENUM_CLASS_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EVENT_JAVA_DOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.EVENT_LISTENER_JAVA_DOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.FOUR_SPACE_INDENTATION;
+import static org.onosproject.yang.compiler.utils.UtilConstants.FROM_STRING_METHOD_NAME;
+import static org.onosproject.yang.compiler.utils.UtilConstants.FROM_STRING_PARAM_NAME;
+import static org.onosproject.yang.compiler.utils.UtilConstants.IMPL_CLASS_JAVA_DOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.INPUT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.INTERFACE_JAVA_DOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_ADD_TO_LIST;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_CONSTRUCTOR;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_END_LINE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_FIRST_LINE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_FOR_VALIDATOR;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_FOR_VALIDATOR_RETURN;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_GETTERS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_MANAGER_SETTERS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_OF;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_PARAM;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RETURN;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_RPC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_SETTERS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.JAVA_DOC_SETTERS_COMMON;
+import static org.onosproject.yang.compiler.utils.UtilConstants.KEYS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.LIST;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MAP;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MAX_RANGE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MIN_RANGE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE_ASTERISK;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OBJECT;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OF;
+import static org.onosproject.yang.compiler.utils.UtilConstants.OP_PARAM_JAVA_DOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PACKAGE_INFO_JAVADOC;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PACKAGE_INFO_JAVADOC_OF_CHILD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
+import static org.onosproject.yang.compiler.utils.UtilConstants.QUEUE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_INPUT_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_OUTPUT_STRING;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SET;
+import static org.onosproject.yang.compiler.utils.UtilConstants.SPACE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.STRING_DATA_TYPE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.TO_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VALIDATE_RANGE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VALUE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VALUE_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.VOID;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getCapitalCase;
+import static org.onosproject.yang.compiler.utils.io.impl.YangIoUtils.getSmallCase;
 
 /**
  * Represents javadoc for the generated classes.
@@ -49,21 +98,12 @@
             case DEFAULT_CLASS: {
                 return generateForClass(name, isList);
             }
-            case BUILDER_CLASS: {
-                return generateForBuilderClass(name);
-            }
             case OPERATION_CLASS: {
                 return generateForOpParamClass(name);
             }
-            case OPERATION_BUILDER_CLASS: {
-                return generateForOpParamClass(name);
-            }
             case INTERFACE: {
                 return generateForInterface(name);
             }
-            case BUILDER_INTERFACE: {
-                return generateForBuilderInterface(name);
-            }
             case PACKAGE_INFO: {
                 return generateForPackage(name, isList);
             }
@@ -85,9 +125,6 @@
             case DEFAULT_CONSTRUCTOR: {
                 return generateForDefaultConstructors(name);
             }
-            case BUILD_METHOD: {
-                return generateForBuild(name);
-            }
             case TYPE_CONSTRUCTOR: {
                 return generateForTypeConstructor(name);
             }
@@ -262,8 +299,7 @@
                 getJavaDocEmptyAsteriskLine() +
                 FOUR_SPACE_INDENTATION + JAVA_DOC_PARAM + attribute + SPACE;
         setter = getParamForAnnotation(setter, compilerAnnotation, isList) +
-                attribute + NEW_LINE + getJavaDocReturnLine(attribute)
-                + getJavaDocEndLine();
+                attribute + NEW_LINE + getJavaDocEndLine();
         return setter;
     }
 
@@ -400,17 +436,6 @@
     }
 
     /**
-     * Generates javaDocs for the builder class.
-     *
-     * @param className class name
-     * @return javaDocs
-     */
-    private static String generateForBuilderClass(String className) {
-        return getJavaDocForClass(className, BUILDER_CLASS_JAVA_DOC,
-                                  EMPTY_STRING);
-    }
-
-    /**
      * Generates javaDocs for the op param class.
      *
      * @param className class name
@@ -433,17 +458,6 @@
     }
 
     /**
-     * Generates javaDoc for the builder interface.
-     *
-     * @param builderForName builder for name
-     * @return javaDocs
-     */
-    private static String generateForBuilderInterface(String builderForName) {
-        return getJavaDocForClass(builderForName, BUILDER_INTERFACE_JAVA_DOC,
-                                  EMPTY_STRING);
-    }
-
-    /**
      * Generates javaDocs for package-info.
      *
      * @param packageName package name
@@ -479,22 +493,7 @@
     private static String generateForConstructors(String className) {
         return getJavaDocStartLine(className, JAVA_DOC_CONSTRUCTOR) +
                 getJavaDocEmptyAsteriskLine() +
-                getJavaDocParamLine(BUILDER_OBJECT + className,
-                                    BUILDER_LOWER_CASE + OBJECT) +
-                getJavaDocEndLine();
-    }
-
-    /**
-     * Generates javaDocs for build.
-     *
-     * @param buildName builder name
-     * @return javaDocs
-     */
-    private static String generateForBuild(String buildName) {
-        return getJavaDocStartLine(buildName, JAVA_DOC_BUILD) +
-                getJavaDocEmptyAsteriskLine() +
-                getJavaDocReturnLine(buildName) +
-                getJavaDocEndLine();
+                getJavaDocParamLine(className, OBJECT) + getJavaDocEndLine();
     }
 
     /**
@@ -568,25 +567,12 @@
         }
         javadoc.append(getJavaDocParamLine(
                 attribute, ADD_STRING + TO_CAPS))
-                .append(getJavaDocReturnLine(BUILDER_OBJECT + attribute))
+                .append(getJavaDocReturnLine(attribute))
                 .append(getJavaDocEndLine());
         return javadoc.toString();
     }
 
     /**
-     * Generates for builder method.
-     *
-     * @param attribute attribute
-     * @return javaDocs
-     */
-    public static String generateForBuilderMethod(String attribute) {
-        return getJavaDocStartLine(attribute + BUILDER, JAVA_DOC_GETTERS) +
-                getJavaDocEmptyAsteriskLine() +
-                getJavaDocReturnLine(attribute + BUILDER) +
-                getJavaDocEndLine();
-    }
-
-    /**
      * Returns class javadoc.
      *
      * @param name   name of class
@@ -686,21 +672,11 @@
         DEFAULT_CLASS,
 
         /**
-         * For builder class.
-         */
-        BUILDER_CLASS,
-
-        /**
          * For interface.
          */
         INTERFACE,
 
         /**
-         * For builder interface.
-         */
-        BUILDER_INTERFACE,
-
-        /**
          * For package-info.
          */
         PACKAGE_INFO,
@@ -796,11 +772,6 @@
         OPERATION_CLASS,
 
         /**
-         * For operation builder.
-         */
-        OPERATION_BUILDER_CLASS,
-
-        /**
          * For add to list.
          */
         ADD_TO_LIST,
diff --git a/compiler/base/utils/src/test/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGenTest.java b/compiler/base/utils/src/test/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGenTest.java
index 9da07d0..3402aaa 100644
--- a/compiler/base/utils/src/test/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGenTest.java
+++ b/compiler/base/utils/src/test/java/org/onosproject/yang/compiler/utils/io/impl/JavaDocGenTest.java
@@ -27,9 +27,6 @@
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsNot.not;
 import static org.junit.Assert.assertThat;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILDER_CLASS;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILDER_INTERFACE;
-import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.BUILD_METHOD;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.CONSTRUCTOR;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.DEFAULT_CLASS;
 import static org.onosproject.yang.compiler.utils.io.impl.JavaDocGen.JavaDocType.DEFAULT_CONSTRUCTOR;
@@ -52,36 +49,6 @@
     public ExpectedException thrown = ExpectedException.none();
 
     /**
-     * This test case checks the content received for the builder class java doc.
-     */
-    @Test
-    public void builderClassGenerationTest() {
-        String builderClassJavaDoc = getJavaDoc(BUILDER_CLASS, TEST_NAME, false, null);
-        assertThat(true, is(builderClassJavaDoc.contains("Represents the builder implementation of")
-                                    && builderClassJavaDoc.contains(END_STRING)));
-    }
-
-    /**
-     * This test case checks the content received for the builder interface ge java doc.
-     */
-    @Test
-    public void builderInterfaceGenerationTest() {
-        String builderInterfaceJavaDoc = getJavaDoc(BUILDER_INTERFACE, TEST_NAME, false, null);
-        assertThat(true,
-                   is(builderInterfaceJavaDoc.contains("Builder for")
-                              && builderInterfaceJavaDoc.contains(END_STRING)));
-    }
-
-    /**
-     * This test case checks the content received for the build  java doc.
-     */
-    @Test
-    public void buildGenerationTest() {
-        String buildDoc = getJavaDoc(BUILD_METHOD, TEST_NAME, false, null);
-        assertThat(true, is(buildDoc.contains("Builds object of") && buildDoc.contains(END_STRING)));
-    }
-
-    /**
      * A private constructor is tested.
      *
      * @throws SecurityException         if any security violation is observed
@@ -112,7 +79,7 @@
         String constructorDoc = getJavaDoc(CONSTRUCTOR, TEST_NAME, false, null);
         assertThat(true,
                    is(constructorDoc.contains("Creates an instance of ")
-                              && constructorDoc.contains("builder object of")
+                              && constructorDoc.contains("object value of")
                               && constructorDoc.contains("@param") && constructorDoc.contains("*/\n")));
     }
 
@@ -185,7 +152,8 @@
     public void setterGenerationTest() {
         String setterJavaDoc = getJavaDoc(SETTER_METHOD, TEST_NAME, false, null);
         assertThat(true,
-                   is(setterJavaDoc.contains("Returns the builder object of") && setterJavaDoc.contains(END_STRING)));
+                   is(setterJavaDoc.contains("Sets the attribute") &&
+                              setterJavaDoc.contains(END_STRING)));
     }
 
     /**
