001/*
002 * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package org.jdrupes.mdoclet.internal.doclets.toolkit;
027
028import javax.lang.model.element.VariableElement;
029
030/**
031 * The interface for writing field output.
032 */
033public interface FieldWriter extends MemberWriter {
034
035    /**
036     * Get the field details header.
037     *
038     * @param content the content representing member details
039     * @return the field details header
040     */
041    Content getFieldDetailsHeader(Content content);
042
043    /**
044     * Get the field documentation header.
045     *
046     * @param field the constructor being documented
047     * @return the field documentation header
048     */
049    Content getFieldHeaderContent(VariableElement field);
050
051    /**
052     * Get the signature for the given field.
053     *
054     * @param field the field being documented
055     * @return the field signature
056     */
057    Content getSignature(VariableElement field);
058
059    /**
060     * Add the deprecated output for the given field.
061     *
062     * @param field the field being documented
063     * @param fieldContent the content to which the deprecated information will be added
064     */
065    void addDeprecated(VariableElement field, Content fieldContent);
066
067    /**
068     * Adds the preview output for the given member.
069     *
070     * @param member the member being documented
071     * @param content the content to which the preview information will be added
072     */
073    void addPreview(VariableElement member, Content content);
074
075    /**
076     * Add the comments for the given field.
077     *
078     * @param field the field being documented
079     * @param fieldContent the content to which the comments will be added
080     */
081    void addComments(VariableElement field, Content fieldContent);
082
083    /**
084     * Add the tags for the given field.
085     *
086     * @param field the field being documented
087     * @param fieldContent the content to which the tags will be added
088     */
089    void addTags(VariableElement field, Content fieldContent);
090
091    /**
092     * Get the field details.
093     *
094     * @param memberDetailsHeaderContent the content representing member details header
095     * @param memberContent the content representing member details
096     * @return the field details
097     */
098    Content getFieldDetails(Content memberDetailsHeaderContent,
099            Content memberContent);
100
101    /**
102     * Gets the member header.
103     *
104     * @return the member header
105     */
106    Content getMemberHeader();
107}