langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java
author briangoetz
Wed, 18 Dec 2013 16:05:18 -0500
changeset 22163 3651128c74eb
parent 16319 e586bfeb39c5
permissions -rw-r--r--
8030244: Update langtools to use Diamond Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     1
/*
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     2
 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     4
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    10
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    15
 * accompanied this code).
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    16
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    20
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    23
 * questions.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    24
 */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    25
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    26
package com.sun.tools.doclets.internal.toolkit.builders;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    27
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    28
import java.util.*;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    29
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    30
import com.sun.tools.doclets.internal.toolkit.util.*;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    31
import com.sun.tools.doclets.internal.toolkit.*;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    32
import com.sun.javadoc.*;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    33
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    34
/**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    35
 * Builds documentation for a property.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    36
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    37
 *  <p><b>This is NOT part of any supported API.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    38
 *  If you write code that depends on this, you do so at your own risk.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    39
 *  This code and its internal interfaces are subject to change or
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    40
 *  deletion without notice.</b>
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    41
 *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    42
 * @author Jamie Ho
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    43
 * @author Bhavesh Patel (Modified)
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    44
 * @since 1.7
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    45
 */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    46
public class PropertyBuilder extends AbstractMemberBuilder {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    47
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    48
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    49
     * The class whose properties are being documented.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    50
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    51
    private final ClassDoc classDoc;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    52
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    53
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    54
     * The visible properties for the given class.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    55
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    56
    private final VisibleMemberMap visibleMemberMap;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    57
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    58
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    59
     * The writer to output the property documentation.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    60
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    61
    private final PropertyWriter writer;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    62
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    63
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    64
     * The list of properties being documented.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    65
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    66
    private final List<ProgramElementDoc> properties;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    67
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    68
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    69
     * The index of the current property that is being documented at this point
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    70
     * in time.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    71
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    72
    private int currentPropertyIndex;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    73
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    74
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    75
     * Construct a new PropertyBuilder.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    76
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    77
     * @param context  the build context.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    78
     * @param classDoc the class whoses members are being documented.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    79
     * @param writer the doclet specific writer.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    80
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    81
    private PropertyBuilder(Context context,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    82
            ClassDoc classDoc,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    83
            PropertyWriter writer) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    84
        super(context);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    85
        this.classDoc = classDoc;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    86
        this.writer = writer;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    87
        visibleMemberMap =
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    88
                new VisibleMemberMap(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    89
                classDoc,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    90
                VisibleMemberMap.PROPERTIES,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    91
                configuration);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    92
        properties =
22163
3651128c74eb 8030244: Update langtools to use Diamond
briangoetz
parents: 16319
diff changeset
    93
                new ArrayList<>(visibleMemberMap.getMembersFor(classDoc));
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    94
        if (configuration.getMemberComparator() != null) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    95
            Collections.sort(properties, configuration.getMemberComparator());
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    96
        }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    97
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    98
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
    99
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   100
     * Construct a new PropertyBuilder.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   101
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   102
     * @param context  the build context.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   103
     * @param classDoc the class whoses members are being documented.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   104
     * @param writer the doclet specific writer.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   105
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   106
    public static PropertyBuilder getInstance(Context context,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   107
            ClassDoc classDoc,
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   108
            PropertyWriter writer) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   109
        return new PropertyBuilder(context, classDoc, writer);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   110
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   111
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   112
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   113
     * {@inheritDoc}
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   114
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   115
    public String getName() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   116
        return "PropertyDetails";
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   117
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   118
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   119
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   120
     * Returns a list of properties that will be documented for the given class.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   121
     * This information can be used for doclet specific documentation
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   122
     * generation.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   123
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   124
     * @param classDoc the {@link ClassDoc} we want to check.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   125
     * @return a list of properties that will be documented.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   126
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   127
    public List<ProgramElementDoc> members(ClassDoc classDoc) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   128
        return visibleMemberMap.getMembersFor(classDoc);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   129
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   130
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   131
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   132
     * Returns the visible member map for the properties of this class.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   133
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   134
     * @return the visible member map for the properties of this class.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   135
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   136
    public VisibleMemberMap getVisibleMemberMap() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   137
        return visibleMemberMap;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   138
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   139
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   140
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   141
     * summaryOrder.size()
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   142
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   143
    public boolean hasMembersToDocument() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   144
        return properties.size() > 0;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   145
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   146
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   147
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   148
     * Build the property documentation.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   149
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   150
     * @param node the XML element that specifies which components to document
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   151
     * @param memberDetailsTree the content tree to which the documentation will be added
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   152
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   153
    public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   154
        if (writer == null) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   155
            return;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   156
        }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   157
        int size = properties.size();
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   158
        if (size > 0) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   159
            Content propertyDetailsTree = writer.getPropertyDetailsTreeHeader(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   160
                    classDoc, memberDetailsTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   161
            for (currentPropertyIndex = 0; currentPropertyIndex < size;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   162
                    currentPropertyIndex++) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   163
                Content propertyDocTree = writer.getPropertyDocTreeHeader(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   164
                        (MethodDoc) properties.get(currentPropertyIndex),
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   165
                        propertyDetailsTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   166
                buildChildren(node, propertyDocTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   167
                propertyDetailsTree.addContent(writer.getPropertyDoc(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   168
                        propertyDocTree, (currentPropertyIndex == size - 1)));
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   169
            }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   170
            memberDetailsTree.addContent(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   171
                    writer.getPropertyDetails(propertyDetailsTree));
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   172
        }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   173
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   174
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   175
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   176
     * Build the signature.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   177
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   178
     * @param node the XML element that specifies which components to document
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   179
     * @param propertyDocTree the content tree to which the documentation will be added
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   180
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   181
    public void buildSignature(XMLNode node, Content propertyDocTree) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   182
        propertyDocTree.addContent(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   183
                writer.getSignature((MethodDoc) properties.get(currentPropertyIndex)));
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   184
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   185
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   186
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   187
     * Build the deprecation information.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   188
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   189
     * @param node the XML element that specifies which components to document
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   190
     * @param propertyDocTree the content tree to which the documentation will be added
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   191
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   192
    public void buildDeprecationInfo(XMLNode node, Content propertyDocTree) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   193
        writer.addDeprecated(
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   194
                (MethodDoc) properties.get(currentPropertyIndex), propertyDocTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   195
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   196
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   197
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   198
     * Build the comments for the property.  Do nothing if
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   199
     * {@link Configuration#nocomment} is set to true.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   200
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   201
     * @param node the XML element that specifies which components to document
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   202
     * @param propertyDocTree the content tree to which the documentation will be added
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   203
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   204
    public void buildPropertyComments(XMLNode node, Content propertyDocTree) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   205
        if (!configuration.nocomment) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   206
            writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   207
        }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   208
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   209
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   210
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   211
     * Build the tag information.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   212
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   213
     * @param node the XML element that specifies which components to document
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   214
     * @param propertyDocTree the content tree to which the documentation will be added
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   215
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   216
    public void buildTagInfo(XMLNode node, Content propertyDocTree) {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   217
        writer.addTags((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree);
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   218
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   219
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   220
    /**
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   221
     * Return the property writer for this builder.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   222
     *
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   223
     * @return the property writer for this builder.
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   224
     */
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   225
    public PropertyWriter getWriter() {
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   226
        return writer;
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   227
    }
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
diff changeset
   228
}