langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java
author ksrini
Mon, 05 Jun 2017 13:45:34 -0700
changeset 45417 f7479ee8de69
parent 40303 96a1226aca18
permissions -rw-r--r--
8177848: Rename Configuration(Impl) classes Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 40303
diff changeset
     2
 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit.taglets;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    27
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    28
import javax.lang.model.element.Element;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    29
import javax.lang.model.element.ExecutableElement;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    31
import com.sun.source.doctree.DocTree;
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 40303
diff changeset
    32
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    33
import jdk.javadoc.internal.doclets.toolkit.Content;
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 38911
diff changeset
    34
import jdk.javadoc.internal.doclets.toolkit.Messages;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    35
import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    36
import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    37
import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    38
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    39
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    40
import static com.sun.source.doctree.DocTree.Kind.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * An inline Taglet representing the <b>inheritDoc</b> tag. This tag should only
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * be used with a method.  It is used to inherit documentation from overriden
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * and implemented methods.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 5520
diff changeset
    47
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 5520
diff changeset
    48
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 5520
diff changeset
    49
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 5520
diff changeset
    50
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
 * @author Jamie Ho
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
public class InheritDocTaglet extends BaseInlineTaglet {
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     * The inline tag that would appear in the documentation if
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     * the writer wanted documentation to be inherited.
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    public static final String INHERIT_DOC_INLINE_TAG = "{@inheritDoc}";
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
     * Construct a new InheritDocTaglet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    public InheritDocTaglet () {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    67
        name = INHERIT_DOC.tagName;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     * Will return false because this inline tag may
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    72
     * not appear in Fields.
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    73
     * @return false
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
    public boolean inField() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
     * Will return false because this inline tag may
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    81
     * not appear in Constructors.
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    82
     * @return false
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
    public boolean inConstructor() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     * Will return false because this inline tag may
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    90
     * not appear in Overview.
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
    91
     * @return false
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
    public boolean inOverview() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
     * Will return false because this inline tag may
38911
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
    99
     * not appear in Modules.
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   100
     * @return false
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   101
     */
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   102
    public boolean inModule() {
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   103
        return false;
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   104
    }
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   105
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   106
    /**
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 35426
diff changeset
   107
     * Will return false because this inline tag may
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   108
     * not appear in Packages.
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   109
     * @return false
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    public boolean inPackage() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
    /**
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   116
     * Will return true because this inline tag may
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   117
     * appear in Type (Class).
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   118
     * @return true
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
    public boolean inType() {
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   121
        return true;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
     * Given a <code>MethodDoc</code> item, a <code>Tag</code> in the
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   126
     * <code>MethodDoc</code> item and a String, replace all occurrences
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
     * of @inheritDoc with documentation from it's superclass or superinterface.
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
     * @param writer the writer that is writing the output.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   130
     * @param e the {@link Element} that we are documenting.
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   131
     * @param holderTag the tag that holds the inheritDoc tag or null for type
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   132
     * (class) docs.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
     * @param isFirstSentence true if we only want to inherit the first sentence.
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17566
diff changeset
   135
    private Content retrieveInheritedDocumentation(TagletWriter writer,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   136
            Element e, DocTree holderTag, boolean isFirstSentence) {
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17566
diff changeset
   137
        Content replacement = writer.getOutputInstance();
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 40303
diff changeset
   138
        BaseConfiguration configuration = writer.configuration();
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 38911
diff changeset
   139
        Messages messages = configuration.getMessages();
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   140
        Utils utils = configuration.utils;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   141
        CommentHelper ch = utils.getCommentHelper(e);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   142
        Taglet inheritableTaglet = holderTag == null
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   143
                ? null
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   144
                : configuration.tagletManager.getTaglet(ch.getTagName(holderTag));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        if (inheritableTaglet != null &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
            !(inheritableTaglet instanceof InheritableTaglet)) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   147
                String message = utils.getSimpleName(e) +
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   148
                    ((utils.isExecutableElement(e))
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   149
                        ? utils.flatSignature((ExecutableElement)e)
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   150
                        : "");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
                //This tag does not support inheritence.
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 38911
diff changeset
   152
                messages.warning(e, "doclet.noInheritedDoc", message);
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   153
        }
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   154
        Input input = new DocFinder.Input(utils, e,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   155
                (InheritableTaglet) inheritableTaglet, new DocFinder.DocTreeInfo(holderTag, e),
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   156
                isFirstSentence, true);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   157
        DocFinder.Output inheritedDoc = DocFinder.search(configuration, input);
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   158
        if (inheritedDoc.isValidInheritDocTag) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   159
            if (!inheritedDoc.inlineTags.isEmpty()) {
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   160
                replacement = writer.commentTagsToOutput(inheritedDoc.holderTag,
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   161
                    inheritedDoc.holder, inheritedDoc.inlineTags, isFirstSentence);
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   162
                ch.setOverrideElement(inheritedDoc.holder);
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   163
            }
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   164
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   165
        } else {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   166
            String message = utils.getSimpleName(e) +
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   167
                    ((utils.isExecutableElement(e))
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   168
                        ? utils.flatSignature((ExecutableElement)e)
17547
40f2f9a5a445 8008768: Using {@inheritDoc} in simple tag defined via -tag fails
jjg
parents: 14542
diff changeset
   169
                        : "");
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 38911
diff changeset
   170
            messages.warning(e, "doclet.noInheritedDoc", message);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        return replacement;
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
     * Given the <code>Tag</code> representation of this custom
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
     * tag, return its string representation, which is output
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
     * to the generated page.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   179
     *
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   180
     * @param e the element holding the tag
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
     * @param tag the <code>Tag</code> representation of this custom tag.
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
     * @param tagletWriter the taglet writer for output.
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17566
diff changeset
   183
     * @return the Content representation of this <code>Tag</code>.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   185
    public Content getTagletOutput(Element e, DocTree tag, TagletWriter tagletWriter) {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   186
        DocTree  inheritTag = tag.getKind() == INHERIT_DOC ? null : tag;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   187
        return retrieveInheritedDocumentation(tagletWriter, e,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   188
                inheritTag, tagletWriter.isFirstSentence);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
}