public static void setEnumDocumentation(Configuration configuration,
            ClassDoc classDoc) {
        MethodDoc[] methods = classDoc.methods();
        for (int j = 0; j < methods.length; j++) {
            MethodDoc currentMethod = methods[j];
            if (currentMethod.name().equals("values") &&
                    currentMethod.parameters().length == 0) {
                StringBuilder sb = new StringBuilder();
                sb.append(configuration.getText("doclet.enum_values_doc.main", classDoc.name()));
                sb.append("\n@return ");
                sb.append(configuration.getText("doclet.enum_values_doc.return"));
                currentMethod.setRawCommentText(sb.toString());
            } else if (currentMethod.name().equals("valueOf") &&
                    currentMethod.parameters().length == 1) {
                Type paramType = currentMethod.parameters()[0].type();
                if (paramType != null &&
                        paramType.qualifiedTypeName().equals(String.class.getName())) {
                StringBuilder sb = new StringBuilder();
                sb.append(configuration.getText("doclet.enum_valueof_doc.main", classDoc.name()));
                sb.append("\n@param name ");
                sb.append(configuration.getText("doclet.enum_valueof_doc.param_name"));
                sb.append("\n@return ");
                sb.append(configuration.getText("doclet.enum_valueof_doc.return"));
                sb.append("\n@throws IllegalArgumentException ");
                sb.append(configuration.getText("doclet.enum_valueof_doc.throws_ila"));
                sb.append("\n@throws NullPointerException ");
                sb.append(configuration.getText("doclet.enum_valueof_doc.throws_npe"));
                currentMethod.setRawCommentText(sb.toString());
                }
            }
        }
    }