FieldWriter.java revision 3233:b5d08bc0d224
1/*
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26package jdk.javadoc.internal.doclets.toolkit;
27
28import java.io.*;
29
30import javax.lang.model.element.TypeElement;
31import javax.lang.model.element.VariableElement;
32
33
34/**
35 * The interface for writing field output.
36 *
37 *  <p><b>This is NOT part of any supported API.
38 *  If you write code that depends on this, you do so at your own risk.
39 *  This code and its internal interfaces are subject to change or
40 *  deletion without notice.</b>
41 *
42 * @author Jamie Ho
43 * @author Bhavesh Patel (Modified)
44 */
45
46public interface FieldWriter {
47
48    /**
49     * Get the field details tree header.
50     *
51     * @param typeElement the class being documented
52     * @param memberDetailsTree the content tree representing member details
53     * @return content tree for the field details header
54     */
55    public Content getFieldDetailsTreeHeader(TypeElement typeElement,
56            Content memberDetailsTree);
57
58    /**
59     * Get the field documentation tree header.
60     *
61     * @param field the constructor being documented
62     * @param fieldDetailsTree the content tree representing field details
63     * @return content tree for the field documentation header
64     */
65    public Content getFieldDocTreeHeader(VariableElement field,
66            Content fieldDetailsTree);
67
68    /**
69     * Get the signature for the given field.
70     *
71     * @param field the field being documented
72     * @return content tree for the field signature
73     */
74    public Content getSignature(VariableElement field);
75
76    /**
77     * Add the deprecated output for the given field.
78     *
79     * @param field the field being documented
80     * @param fieldDocTree content tree to which the deprecated information will be added
81     */
82    public void addDeprecated(VariableElement field, Content fieldDocTree);
83
84    /**
85     * Add the comments for the given field.
86     *
87     * @param field the field being documented
88     * @param fieldDocTree the content tree to which the comments will be added
89     */
90    public void addComments(VariableElement field, Content fieldDocTree);
91
92    /**
93     * Add the tags for the given field.
94     *
95     * @param field the field being documented
96     * @param fieldDocTree the content tree to which the tags will be added
97     */
98    public void addTags(VariableElement field, Content fieldDocTree);
99
100    /**
101     * Get the field details tree.
102     *
103     * @param memberDetailsTree the content tree representing member details
104     * @return content tree for the field details
105     */
106    public Content getFieldDetails(Content memberDetailsTree);
107
108    /**
109     * Get the field documentation.
110     *
111     * @param fieldDocTree the content tree representing field documentation
112     * @param isLastContent true if the content to be added is the last content
113     * @return content tree for the field documentation
114     */
115    public Content getFieldDoc(Content fieldDocTree, boolean isLastContent);
116
117    /**
118     * Close the writer.
119     */
120    public void close() throws IOException;
121}
122