public static EnumConstantBuilder getInstance(
                Configuration configuration,
                ClassDoc classDoc,
                EnumConstantWriter writer) {
                EnumConstantBuilder builder = new EnumConstantBuilder(configuration);
                builder.classDoc = classDoc;
                builder.writer = writer;
                builder.visibleMemberMap =
                        new VisibleMemberMap(
                                classDoc,
                                VisibleMemberMap.ENUM_CONSTANTS,
                                configuration.nodeprecated);
                builder.enumConstants =
                        new ArrayList(builder.visibleMemberMap.getMembersFor(classDoc));
                if (configuration.getMemberComparator() != null) {
                        Collections.sort(
                                builder.enumConstants,
                                configuration.getMemberComparator());
                }
                return builder;
        }