ConstructorWriter.java revision 3233:b5d08bc0d224
155714Skris/*
255714Skris * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
355714Skris * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
455714Skris *
555714Skris * This code is free software; you can redistribute it and/or modify it
655714Skris * under the terms of the GNU General Public License version 2 only, as
755714Skris * published by the Free Software Foundation.  Oracle designates this
8280304Sjkim * particular file as subject to the "Classpath" exception as provided
955714Skris * by Oracle in the LICENSE file that accompanied this code.
1055714Skris *
1155714Skris * This code is distributed in the hope that it will be useful, but WITHOUT
1255714Skris * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1355714Skris * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1455714Skris * version 2 for more details (a copy is included in the LICENSE file that
15280304Sjkim * accompanied this code).
1655714Skris *
1755714Skris * You should have received a copy of the GNU General Public License version
1855714Skris * 2 along with this work; if not, write to the Free Software Foundation,
1955714Skris * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2055714Skris *
2155714Skris * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22280304Sjkim * or visit www.oracle.com if you need additional information or have any
2355714Skris * questions.
2455714Skris */
2555714Skris
2655714Skrispackage jdk.javadoc.internal.doclets.toolkit;
2755714Skris
2855714Skrisimport java.io.*;
2955714Skris
3055714Skrisimport javax.lang.model.element.ExecutableElement;
3155714Skrisimport javax.lang.model.element.TypeElement;
3255714Skris
3355714Skris/**
3455714Skris * The interface for writing constructor output.
3555714Skris *
3655714Skris *  <p><b>This is NOT part of any supported API.
37280304Sjkim *  If you write code that depends on this, you do so at your own risk.
3855714Skris *  This code and its internal interfaces are subject to change or
3955714Skris *  deletion without notice.</b>
40280304Sjkim *
4155714Skris * @author Jamie Ho
4255714Skris * @author Bhavesh Patel (Modified)
4355714Skris */
4455714Skris
4555714Skrispublic interface ConstructorWriter {
4655714Skris
4755714Skris    /**
4855714Skris     * Get the constructor details tree header.
4955714Skris     *
5055714Skris     * @param typeElement the class being documented
5155714Skris     * @param memberDetailsTree the content tree representing member details
52280304Sjkim     * @return content tree for the constructor details header
5355714Skris     */
5455714Skris    public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
5555714Skris            Content memberDetailsTree);
5655714Skris
5755714Skris    /**
5855714Skris     * Get the constructor documentation tree header.
5955714Skris     *
6055714Skris     * @param constructor the constructor being documented
6155714Skris     * @param constructorDetailsTree the content tree representing constructor details
6255714Skris     * @return content tree for the constructor documentation header
6355714Skris     */
6455714Skris    public Content getConstructorDocTreeHeader(ExecutableElement constructor,
6555714Skris            Content constructorDetailsTree);
66160814Ssimon
67280304Sjkim    /**
68160814Ssimon     * Get the signature for the given constructor.
69160814Ssimon     *
70280304Sjkim     * @param constructor the constructor being documented
71160814Ssimon     * @return content tree for the constructor signature
7255714Skris     */
7355714Skris    public Content getSignature(ExecutableElement constructor);
74280304Sjkim
75280304Sjkim    /**
76280304Sjkim     * Add the deprecated output for the given constructor.
77280304Sjkim     *
78280304Sjkim     * @param constructor the constructor being documented
79280304Sjkim     * @param constructorDocTree content tree to which the deprecated information will be added
8055714Skris     */
8155714Skris    public void addDeprecated(ExecutableElement constructor, Content constructorDocTree);
82280304Sjkim
83280304Sjkim    /**
84280304Sjkim     * Add the comments for the given constructor.
85280304Sjkim     *
8655714Skris     * @param constructor the constructor being documented
8755714Skris     * @param constructorDocTree the content tree to which the comments will be added
88280304Sjkim     */
89280304Sjkim    public void addComments(ExecutableElement constructor, Content constructorDocTree);
90280304Sjkim
91280304Sjkim    /**
9255714Skris     * Add the tags for the given constructor.
9355714Skris     *
94280304Sjkim     * @param constructor the constructor being documented
95280304Sjkim     * @param constructorDocTree the content tree to which the tags will be added
96280304Sjkim     */
97280304Sjkim    public void addTags(ExecutableElement constructor, Content constructorDocTree);
98280304Sjkim
9955714Skris    /**
100238405Sjkim     * Get the constructor details tree.
101280304Sjkim     *
102280304Sjkim     * @param memberDetailsTree the content tree representing member details
103280304Sjkim     * @return content tree for the constructor details
104280304Sjkim     */
105280304Sjkim    public Content getConstructorDetails(Content memberDetailsTree);
106280304Sjkim
107238405Sjkim    /**
10855714Skris     * Get the constructor documentation.
109280304Sjkim     *
110280304Sjkim     * @param constructorDocTree the content tree representing constructor documentation
111280304Sjkim     * @param isLastContent true if the content to be added is the last content
112280304Sjkim     * @return content tree for the constructor documentation
11355714Skris     */
114238405Sjkim    public Content getConstructorDoc(Content constructorDocTree, boolean isLastContent);
115280304Sjkim
116280304Sjkim    /**
117280304Sjkim     * Let the writer know whether a non public constructor was found.
118280304Sjkim     *
119280304Sjkim     * @param foundNonPubConstructor true if we found a non public constructor.
120238405Sjkim     */
12155714Skris    public void setFoundNonPubConstructor(boolean foundNonPubConstructor);
122280304Sjkim
123280304Sjkim    /**
124280304Sjkim     * Close the writer.
125280304Sjkim     */
126280304Sjkim    public void close() throws IOException;
12755714Skris}
128238405Sjkim