@Test public void generateBuilderInterfaceDefinitionTest() { String builderInterfaceDefinition = generateClassDefinition(BUILDER_INTERFACE_MASK, CLASS_NAME); assertThat(true, is(builderInterfaceDefinition.equals(BULDER_INTERFACE_CLASS_DEF))); }
public static String generateClassDefinition(int genFileTypes, String yangName) { switch (genFileTypes) { case BUILDER_CLASS_MASK: return getBuilderClassDefinition(yangName); case IMPL_CLASS_MASK: return getImplClassDefinition(yangName); case BUILDER_INTERFACE_MASK: return getBuilderInterfaceDefinition(yangName); case GENERATE_TYPEDEF_CLASS: case GENERATE_UNION_CLASS: return getTypeClassDefinition(yangName); case GENERATE_ENUM_CLASS: return getEnumClassDefinition(yangName); default: return null; } }
ClassDefinitionGenerator { public static String generateClassDefinition(int genFileTypes, String yangName) { switch (genFileTypes) { case BUILDER_CLASS_MASK: return getBuilderClassDefinition(yangName); case IMPL_CLASS_MASK: return getImplClassDefinition(yangName); case BUILDER_INTERFACE_MASK: return getBuilderInterfaceDefinition(yangName); case GENERATE_TYPEDEF_CLASS: case GENERATE_UNION_CLASS: return getTypeClassDefinition(yangName); case GENERATE_ENUM_CLASS: return getEnumClassDefinition(yangName); default: return null; } } }
ClassDefinitionGenerator { public static String generateClassDefinition(int genFileTypes, String yangName) { switch (genFileTypes) { case BUILDER_CLASS_MASK: return getBuilderClassDefinition(yangName); case IMPL_CLASS_MASK: return getImplClassDefinition(yangName); case BUILDER_INTERFACE_MASK: return getBuilderInterfaceDefinition(yangName); case GENERATE_TYPEDEF_CLASS: case GENERATE_UNION_CLASS: return getTypeClassDefinition(yangName); case GENERATE_ENUM_CLASS: return getEnumClassDefinition(yangName); default: return null; } } private  ClassDefinitionGenerator(); }
ClassDefinitionGenerator { public static String generateClassDefinition(int genFileTypes, String yangName) { switch (genFileTypes) { case BUILDER_CLASS_MASK: return getBuilderClassDefinition(yangName); case IMPL_CLASS_MASK: return getImplClassDefinition(yangName); case BUILDER_INTERFACE_MASK: return getBuilderInterfaceDefinition(yangName); case GENERATE_TYPEDEF_CLASS: case GENERATE_UNION_CLASS: return getTypeClassDefinition(yangName); case GENERATE_ENUM_CLASS: return getEnumClassDefinition(yangName); default: return null; } } private  ClassDefinitionGenerator(); static String generateClassDefinition(int genFileTypes, String yangName); static String generateClassDefinition(int genFileTypes, String yangName, YangNode curNode); }
ClassDefinitionGenerator { public static String generateClassDefinition(int genFileTypes, String yangName) { switch (genFileTypes) { case BUILDER_CLASS_MASK: return getBuilderClassDefinition(yangName); case IMPL_CLASS_MASK: return getImplClassDefinition(yangName); case BUILDER_INTERFACE_MASK: return getBuilderInterfaceDefinition(yangName); case GENERATE_TYPEDEF_CLASS: case GENERATE_UNION_CLASS: return getTypeClassDefinition(yangName); case GENERATE_ENUM_CLASS: return getEnumClassDefinition(yangName); default: return null; } } private  ClassDefinitionGenerator(); static String generateClassDefinition(int genFileTypes, String yangName); static String generateClassDefinition(int genFileTypes, String yangName, YangNode curNode);  }