MethodWriter.java revision 3233:b5d08bc0d224
1139825Simp/*
299663Sbenno * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
399663Sbenno * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
499663Sbenno *
599663Sbenno * This code is free software; you can redistribute it and/or modify it
699663Sbenno * under the terms of the GNU General Public License version 2 only, as
799663Sbenno * published by the Free Software Foundation.  Oracle designates this
899663Sbenno * particular file as subject to the "Classpath" exception as provided
999663Sbenno * by Oracle in the LICENSE file that accompanied this code.
1099663Sbenno *
1199663Sbenno * This code is distributed in the hope that it will be useful, but WITHOUT
1299663Sbenno * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1399663Sbenno * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1499663Sbenno * version 2 for more details (a copy is included in the LICENSE file that
1599663Sbenno * accompanied this code).
1699663Sbenno *
1799663Sbenno * You should have received a copy of the GNU General Public License version
1899663Sbenno * 2 along with this work; if not, write to the Free Software Foundation,
1999663Sbenno * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2099663Sbenno *
2199663Sbenno * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2299663Sbenno * or visit www.oracle.com if you need additional information or have any
2399663Sbenno * questions.
2499663Sbenno */
2599663Sbenno
2699663Sbennopackage jdk.javadoc.internal.doclets.toolkit;
2799663Sbenno
2899663Sbennoimport java.io.*;
2999663Sbenno
30131102Sgrehanimport javax.lang.model.element.ExecutableElement;
3199663Sbennoimport javax.lang.model.element.TypeElement;
3299663Sbennoimport javax.lang.model.type.TypeMirror;
3399663Sbenno
3499663Sbenno/**
3599663Sbenno * The interface for writing method output.
3699663Sbenno *
37183882Snwhitehorn *  <p><b>This is NOT part of any supported API.
38186128Snwhitehorn *  If you write code that depends on this, you do so at your own risk.
3999663Sbenno *  This code and its internal interfaces are subject to change or
4099663Sbenno *  deletion without notice.</b>
4199663Sbenno *
4299663Sbenno * @author Jamie Ho
4399663Sbenno * @author Bhavesh Patel (Modified)
44208149Snwhitehorn */
4599663Sbenno
46174782Smarcelpublic interface MethodWriter {
4799663Sbenno
4899663Sbenno    /**
4999663Sbenno     * Get the method details tree header.
5099663Sbenno     *
5199663Sbenno     * @param typeElement the class being documented
5299663Sbenno     * @param memberDetailsTree the content tree representing member details
5399663Sbenno     * @return content tree for the method details header
5499663Sbenno     */
5599663Sbenno    public Content getMethodDetailsTreeHeader(TypeElement typeElement,
56208149Snwhitehorn            Content memberDetailsTree);
57208149Snwhitehorn
58208149Snwhitehorn    /**
5999663Sbenno     * Get the method documentation tree header.
60208149Snwhitehorn     *
6199663Sbenno     * @param method the method being documented
6299663Sbenno     * @param methodDetailsTree the content tree representing method details
6399663Sbenno     * @return content tree for the method documentation header
6499663Sbenno     */
6599663Sbenno    public Content getMethodDocTreeHeader(ExecutableElement method,
66208149Snwhitehorn            Content methodDetailsTree);
67208149Snwhitehorn
68208149Snwhitehorn    /**
6999663Sbenno     * Get the signature for the given method.
7099663Sbenno     *
7199663Sbenno     * @param method the method being documented
72208149Snwhitehorn     * @return content tree for the method signature
73208149Snwhitehorn     */
74208149Snwhitehorn    public Content getSignature(ExecutableElement method);
75208149Snwhitehorn
76208149Snwhitehorn    /**
77208149Snwhitehorn     * Add the deprecated output for the given method.
78208149Snwhitehorn     *
79208149Snwhitehorn     * @param method the method being documented
80208149Snwhitehorn     * @param methodDocTree content tree to which the deprecated information will be added
81208149Snwhitehorn     */
82208149Snwhitehorn    public void addDeprecated(ExecutableElement method, Content methodDocTree);
8399663Sbenno
8499663Sbenno    /**
85183882Snwhitehorn     * Add the comments for the given method.
86183882Snwhitehorn     *
87183882Snwhitehorn     * @param holder the holder type (not erasure) of the method
88208149Snwhitehorn     * @param method the method being documented
89183882Snwhitehorn     * @param methodDocTree the content tree to which the comments will be added
90183882Snwhitehorn     */
91208149Snwhitehorn    public void addComments(TypeMirror holder, ExecutableElement method, Content methodDocTree);
9299663Sbenno
9399663Sbenno    /**
94208149Snwhitehorn     * Add the tags for the given method.
95208149Snwhitehorn     *
96208149Snwhitehorn     * @param method the method being documented
9799663Sbenno     * @param methodDocTree the content tree to which the tags will be added
9899663Sbenno     */
9999663Sbenno    public void addTags(ExecutableElement method, Content methodDocTree);
100208149Snwhitehorn
101208149Snwhitehorn    /**
10299663Sbenno     * Get the method details tree.
103208149Snwhitehorn     *
104208149Snwhitehorn     * @param methodDetailsTree the content tree representing method details
10599663Sbenno     * @return content tree for the method details
10699663Sbenno     */
107208149Snwhitehorn    public Content getMethodDetails(Content methodDetailsTree);
108208149Snwhitehorn
109208149Snwhitehorn    /**
110208149Snwhitehorn     * Get the method documentation.
11199663Sbenno     *
112208149Snwhitehorn     * @param methodDocTree the content tree representing method documentation
113208149Snwhitehorn     * @param isLastContent true if the content to be added is the last content
114208149Snwhitehorn     * @return content tree for the method documentation
115208149Snwhitehorn     */
116208149Snwhitehorn    public Content getMethodDoc(Content methodDocTree, boolean isLastContent);
11799663Sbenno
118208871Snwhitehorn    /**
119208871Snwhitehorn     * Close the writer.
120208149Snwhitehorn     */
121208149Snwhitehorn    public void close() throws IOException;
122208149Snwhitehorn}
123208149Snwhitehorn