langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java
author jjg
Tue, 14 May 2013 10:14:52 -0700
changeset 17560 9f6771abbd1a
parent 17558 eee4ccf66cfd
child 17561 9f3505f35da9
permissions -rw-r--r--
8011650: reduce use of RawHtml nodes in doclet Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14542
diff changeset
     2
 * Copyright (c) 2003, 2013, 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: 1787
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: 1787
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: 1787
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
package com.sun.tools.doclets.formats.html;
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.javadoc.*;
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
    30
import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
    31
import com.sun.tools.doclets.formats.html.markup.StringContent;
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
    32
import com.sun.tools.doclets.internal.toolkit.Content;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
import com.sun.tools.doclets.internal.toolkit.util.links.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9083
diff changeset
    36
/**
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9083
diff changeset
    37
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9083
diff changeset
    38
 *  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: 9083
diff changeset
    39
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9083
diff changeset
    40
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9083
diff changeset
    41
 */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
public class LinkInfoImpl extends LinkInfo {
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    44
    public enum Kind {
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    45
        DEFAULT,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    47
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    48
         * Indicate that the link appears in a class list.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    49
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    50
        ALL_CLASSES_FRAME,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    52
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    53
         * Indicate that the link appears in a class documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    54
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    55
        CLASS,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    57
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    58
         * Indicate that the link appears in member documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    59
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    60
        MEMBER,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    62
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    63
         * Indicate that the link appears in class use documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    64
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    65
        CLASS_USE,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    67
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    68
         * Indicate that the link appears in index documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    69
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    70
        INDEX,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    72
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    73
         * Indicate that the link appears in constant value summary.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    74
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    75
        CONSTANT_SUMMARY,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    77
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    78
         * Indicate that the link appears in serialized form documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    79
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    80
        SERIALIZED_FORM,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    82
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    83
         * Indicate that the link appears in serial member documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    84
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    85
        SERIAL_MEMBER,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    87
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    88
         * Indicate that the link appears in package documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    89
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    90
        PACKAGE,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    92
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    93
         * Indicate that the link appears in see tag documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    94
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    95
        SEE_TAG,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    97
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    98
         * Indicate that the link appears in value tag documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
    99
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   100
        VALUE_TAG,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   102
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   103
         * Indicate that the link appears in tree documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   104
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   105
        TREE,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   107
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   108
         * Indicate that the link appears in a class list.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   109
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   110
        PACKAGE_FRAME,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   112
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   113
         * The header in the class documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   114
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   115
        CLASS_HEADER,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   117
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   118
         * The signature in the class documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   119
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   120
        CLASS_SIGNATURE,
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   121
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   122
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   123
         * The return type of a method.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   124
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   125
        RETURN_TYPE,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   127
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   128
         * The return type of a method in a member summary.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   129
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   130
        SUMMARY_RETURN_TYPE,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   132
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   133
         * The type of a method/constructor parameter.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   134
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   135
        EXECUTABLE_MEMBER_PARAM,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   137
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   138
         * Super interface links.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   139
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   140
        SUPER_INTERFACES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   142
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   143
         * Implemented interface links.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   144
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   145
        IMPLEMENTED_INTERFACES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   147
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   148
         * Implemented class links.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   149
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   150
        IMPLEMENTED_CLASSES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   152
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   153
         * Subinterface links.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   154
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   155
        SUBINTERFACES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   157
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   158
         * Subclasses links.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   159
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   160
        SUBCLASSES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   162
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   163
         * The signature in the class documentation (implements/extends portion).
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   164
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   165
        CLASS_SIGNATURE_PARENT_NAME,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   167
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   168
         * The header for method documentation copied from parent.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   169
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   170
        METHOD_DOC_COPY,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   172
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   173
         * Method "specified by" link.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   174
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   175
        METHOD_SPECIFIED_BY,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   177
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   178
         * Method "overrides" link.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   179
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   180
        METHOD_OVERRIDES,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   182
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   183
         * Annotation link.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   184
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   185
        ANNOTATION,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   187
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   188
         * The header for field documentation copied from parent.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   189
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   190
        FIELD_DOC_COPY,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   192
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   193
         * The parent nodes in the class tree.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   194
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   195
        CLASS_TREE_PARENT,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   197
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   198
         * The type parameters of a method or constructor.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   199
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   200
        MEMBER_TYPE_PARAMS,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   202
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   203
         * Indicate that the link appears in class use documentation.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   204
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   205
        CLASS_USE_HEADER,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   207
        /**
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   208
         * The header for property documentation copied from parent.
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   209
         */
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   210
        PROPERTY_DOC_COPY
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   211
    }
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents: 15385
diff changeset
   212
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   213
    public final ConfigurationImpl configuration;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   214
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    /**
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   216
     * The location of the link.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
     */
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   218
    public Kind context = Kind.DEFAULT;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
     * The value of the marker #.
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
    public String where = "";
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
     * String style of text defined in style sheet.
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
     */
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   228
    public String styleName = "";
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    /**
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   231
     * The value of the target.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
    public String target = "";
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   238
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
     * @param classDoc   the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
     * @param label      the label for the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
     * @param target     the value of the target attribute.
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   244
    public LinkInfoImpl(ConfigurationImpl configuration,
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   245
            Kind context, ClassDoc classDoc, Content label, String target) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   246
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
        this.classDoc = classDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
        this.label = label;
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
        this.target = target;
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
    /**
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   254
     * {@inherotDoc}
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   255
     */
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   256
    protected Content newContent() {
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   257
        return new ContentBuilder();
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   258
    }
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   259
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   260
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   263
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
     * @param classDoc   the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
     * @param where      the value of the marker #.
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
     * @param label      the label for the link.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   268
     * @param isStrong       true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
     * @param styleName  String style of text defined in style sheet.
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   271
    public LinkInfoImpl(ConfigurationImpl configuration,
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   272
            Kind context, ClassDoc classDoc, String where, Content label,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   273
            boolean isStrong, String styleName) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   274
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
        this.classDoc = classDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
        this.where = where;
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
        this.label = label;
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   278
        this.isStrong = isStrong;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
        this.styleName = styleName;
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   286
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
     * @param classDoc   the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
     * @param where      the value of the marker #.
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   290
     * @param label      the plain-text label for the link.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   291
     * @param isStrong       true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   293
    public LinkInfoImpl(ConfigurationImpl configuration,
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   294
            Kind context, ClassDoc classDoc, String where, String label,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   295
            boolean isStrong) {
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   296
        this(configuration, context, classDoc, where, new StringContent(label),
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   297
                isStrong, "");
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   298
    }
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   299
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   300
    /**
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   301
     * Construct a LinkInfo object.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   302
     *
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   303
     * @param configuration the configuration data for the doclet
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   304
     * @param context    the context of the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   305
     * @param classDoc   the class to link to.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   306
     * @param where      the value of the marker #.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   307
     * @param label      the label for the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   308
     * @param isStrong       true if the link should be strong.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   309
     */
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   310
    public LinkInfoImpl(ConfigurationImpl configuration,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   311
            Kind context, ClassDoc classDoc, String where, Content label,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   312
            boolean isStrong) {
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   313
        this(configuration, context, classDoc, where, label,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   314
                isStrong, "");
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   315
    }
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   316
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   317
    /**
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   318
     * Construct a LinkInfo object.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   319
     *
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   320
     * @param configuration the configuration data for the doclet
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   321
     * @param classDoc   the class to link to.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   322
     * @param label      the label for the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   323
     */
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   324
    public LinkInfoImpl(ConfigurationImpl configuration,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   325
            ClassDoc classDoc, Content label) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   326
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
        this.classDoc = classDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
        this.label = label;
06bc494ca11e Initial load
duke
parents:
diff changeset
   329
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   335
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
     * @param classDoc   the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
     * @param label      the label for the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   339
    public LinkInfoImpl(ConfigurationImpl configuration,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   340
            ClassDoc classDoc, String label) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   341
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
        this.classDoc = classDoc;
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   343
        this.label = new StringContent(label);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   350
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
     * @param context               the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
     * @param executableMemberDoc   the member to link to.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   353
     * @param isStrong                true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   355
    public LinkInfoImpl(ConfigurationImpl configuration,
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   356
            Kind context, ExecutableMemberDoc executableMemberDoc,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   357
            boolean isStrong) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   358
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   359
        this.executableMemberDoc = executableMemberDoc;
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   360
        this.isStrong = isStrong;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
06bc494ca11e Initial load
duke
parents:
diff changeset
   364
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   366
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   367
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   368
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
     * @param classDoc   the class to link to.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   370
     * @param isStrong       true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   372
    public LinkInfoImpl(ConfigurationImpl configuration,
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   373
            Kind context, ClassDoc classDoc,  boolean isStrong) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   374
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   375
        this.classDoc = classDoc;
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   376
        this.isStrong = isStrong;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   377
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   378
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   379
06bc494ca11e Initial load
duke
parents:
diff changeset
   380
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   381
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   382
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   383
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   384
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   385
     * @param type       the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   386
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   387
    public LinkInfoImpl(ConfigurationImpl configuration,
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   388
            Kind context, Type type) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   389
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   390
        this.type = type;
06bc494ca11e Initial load
duke
parents:
diff changeset
   391
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   392
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   393
06bc494ca11e Initial load
duke
parents:
diff changeset
   394
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   395
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   396
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   397
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   398
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   399
     * @param type       the class to link to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   400
     * @param isVarArg   true if this is a link to a var arg.
06bc494ca11e Initial load
duke
parents:
diff changeset
   401
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   402
    public LinkInfoImpl(ConfigurationImpl configuration,
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   403
            Kind context, Type type, boolean isVarArg) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   404
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
        this.type = type;
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
        this.isVarArg = isVarArg;
06bc494ca11e Initial load
duke
parents:
diff changeset
   407
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   408
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   409
06bc494ca11e Initial load
duke
parents:
diff changeset
   410
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   411
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   412
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   413
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   414
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   415
     * @param type       the class to link to.
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   416
     * @param label      plain-text label for the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   417
     * @param isStrong     true if the link should be strong.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   418
     */
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   419
    public LinkInfoImpl(ConfigurationImpl configuration,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   420
            Kind context, Type type, String label,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   421
            boolean isStrong) {
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   422
        this(configuration, context, type, new StringContent(label), isStrong);
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   423
    }
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   424
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   425
    /**
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   426
     * Construct a LinkInfo object.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   427
     *
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   428
     * @param configuration the configuration data for the doclet
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   429
     * @param context    the context of the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   430
     * @param type       the class to link to.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
     * @param label      the label for the link.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   432
     * @param isStrong     true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   434
    public LinkInfoImpl(ConfigurationImpl configuration,
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   435
            Kind context, Type type, Content label,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   436
            boolean isStrong) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   437
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
        this.type = type;
06bc494ca11e Initial load
duke
parents:
diff changeset
   439
        this.label = label;
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   440
        this.isStrong = isStrong;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
     * Construct a LinkInfo object.
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   447
     * @param configuration the configuration data for the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
     * @param context    the context of the link.
06bc494ca11e Initial load
duke
parents:
diff changeset
   449
     * @param classDoc   the class to link to.
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   450
     * @param label      plain-text label for the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   451
     * @param isStrong       true if the link should be strong.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   452
     */
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   453
    public LinkInfoImpl(ConfigurationImpl configuration,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   454
            Kind context, ClassDoc classDoc, String label,
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   455
            boolean isStrong) {
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   456
        this(configuration, context, classDoc, new StringContent(label), isStrong);
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   457
    }
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   458
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   459
    /**
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   460
     * Construct a LinkInfo object.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   461
     *
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   462
     * @param configuration the configuration data for the doclet
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   463
     * @param context    the context of the link.
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   464
     * @param classDoc   the class to link to.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   465
     * @param label      the label for the link.
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   466
     * @param isStrong       true if the link should be strong.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   467
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   468
    public LinkInfoImpl(ConfigurationImpl configuration,
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 17558
diff changeset
   469
            Kind context, ClassDoc classDoc, Content label,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   470
            boolean isStrong) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   471
        this.configuration = configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   472
        this.classDoc = classDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
   473
        this.label = label;
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   474
        this.isStrong = isStrong;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   475
        setContext(context);
06bc494ca11e Initial load
duke
parents:
diff changeset
   476
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
06bc494ca11e Initial load
duke
parents:
diff changeset
   478
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   479
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   480
     */
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   481
    public Kind getContext() {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
        return context;
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   484
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   486
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   487
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
     * This method sets the link attributes to the appropriate values
06bc494ca11e Initial load
duke
parents:
diff changeset
   489
     * based on the context.
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   491
     * @param c the context id to set.
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
     */
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   493
    public final void setContext(Kind c) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   494
        //NOTE:  Put context specific link code here.
06bc494ca11e Initial load
duke
parents:
diff changeset
   495
        switch (c) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   496
            case ALL_CLASSES_FRAME:
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
            case PACKAGE_FRAME:
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   498
            case IMPLEMENTED_CLASSES:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   499
            case SUBCLASSES:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   500
            case METHOD_DOC_COPY:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   501
            case FIELD_DOC_COPY:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   502
            case PROPERTY_DOC_COPY:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   503
            case CLASS_USE_HEADER:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   504
                includeTypeInClassLinkLabel = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   505
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   506
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   507
            case ANNOTATION:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   508
                excludeTypeParameterLinks = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
                excludeTypeBounds = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   510
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   511
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   512
            case IMPLEMENTED_INTERFACES:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   513
            case SUPER_INTERFACES:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   514
            case SUBINTERFACES:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   515
            case CLASS_TREE_PARENT:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   516
            case TREE:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   517
            case CLASS_SIGNATURE_PARENT_NAME:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   518
                excludeTypeParameterLinks = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   519
                excludeTypeBounds = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   520
                includeTypeInClassLinkLabel = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   521
                includeTypeAsSepLink = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   522
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   523
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   524
            case PACKAGE:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   525
            case CLASS_USE:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   526
            case CLASS_HEADER:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   527
            case CLASS_SIGNATURE:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   528
                excludeTypeParameterLinks = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   529
                includeTypeAsSepLink = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   530
                includeTypeInClassLinkLabel = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   531
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   532
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   533
            case MEMBER_TYPE_PARAMS:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   534
                includeTypeAsSepLink = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   535
                includeTypeInClassLinkLabel = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   536
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   537
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   538
            case RETURN_TYPE:
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   539
            case SUMMARY_RETURN_TYPE:
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14542
diff changeset
   540
                excludeTypeBounds = true;
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14542
diff changeset
   541
                break;
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 16319
diff changeset
   542
            case EXECUTABLE_MEMBER_PARAM:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   543
                excludeTypeBounds = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   544
                break;
06bc494ca11e Initial load
duke
parents:
diff changeset
   545
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   546
        context = c;
06bc494ca11e Initial load
duke
parents:
diff changeset
   547
        if (type != null &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   548
            type.asTypeVariable()!= null &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   549
            type.asTypeVariable().owner() instanceof ExecutableMemberDoc){
06bc494ca11e Initial load
duke
parents:
diff changeset
   550
            excludeTypeParameterLinks = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   551
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   552
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   553
06bc494ca11e Initial load
duke
parents:
diff changeset
   554
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   555
     * Return true if this link is linkable and false if we can't link to the
06bc494ca11e Initial load
duke
parents:
diff changeset
   556
     * desired place.
06bc494ca11e Initial load
duke
parents:
diff changeset
   557
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   558
     * @return true if this link is linkable and false if we can't link to the
06bc494ca11e Initial load
duke
parents:
diff changeset
   559
     * desired place.
06bc494ca11e Initial load
duke
parents:
diff changeset
   560
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   561
    public boolean isLinkable() {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   562
        return Util.isLinkable(classDoc, configuration);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   563
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   564
}