public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) {
        FieldDoc field = getFieldDoc(
            writer.configuration(), tag, tag.text());
        if (field == null) {
            //Reference is unknown.
            writer.getMsgRetriever().warning(tag.holder().position(),
                "doclet.value_tag_invalid_reference", tag.text());
        } else if (field.constantValue() != null) {
            return writer.valueTagOutput(field,
                Util.escapeHtmlChars(field.constantValueExpression()),
                ! field.equals(tag.holder()));
        } else {
            //Referenced field is not a constant.
            writer.getMsgRetriever().warning(tag.holder().position(),
                "doclet.value_tag_invalid_constant", field.name());
        }
        return writer.getOutputInstance();
    }