< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java

Print this page




  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.ExecutableElement;
  32 import javax.lang.model.element.TypeElement;
  33 
  34 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
  35 import jdk.javadoc.internal.doclets.toolkit.ConstructorWriter;
  36 import jdk.javadoc.internal.doclets.toolkit.Content;
  37 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  38 
  39 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
  40 
  41 /**
  42  * Builds documentation for a constructor.
  43  *
  44  *  <p><b>This is NOT part of any supported API.
  45  *  If you write code that depends on this, you do so at your own risk.
  46  *  This code and its internal interfaces are subject to change or
  47  *  deletion without notice.</b>
  48  */
  49 public class ConstructorBuilder extends AbstractMemberBuilder {
  50 
  51     /**
  52      * The current constructor that is being documented at this point in time.
  53      */
  54     private ExecutableElement currentConstructor;


 154     /**
 155      * Build the signature.
 156      *
 157      * @param constructorDocTree the content tree to which the documentation will be added
 158      */
 159     protected void buildSignature(Content constructorDocTree) {
 160         constructorDocTree.add(writer.getSignature(currentConstructor));
 161     }
 162 
 163     /**
 164      * Build the deprecation information.
 165      *
 166      * @param constructorDocTree the content tree to which the documentation will be added
 167      */
 168     protected void buildDeprecationInfo(Content constructorDocTree) {
 169         writer.addDeprecated(currentConstructor, constructorDocTree);
 170     }
 171 
 172     /**
 173      * Build the comments for the constructor.  Do nothing if
 174      * {@link BaseConfiguration#nocomment} is set to true.
 175      *
 176      * @param constructorDocTree the content tree to which the documentation will be added
 177      */
 178     protected void buildConstructorComments(Content constructorDocTree) {
 179         if (!configuration.nocomment) {
 180             writer.addComments(currentConstructor, constructorDocTree);
 181         }
 182     }
 183 
 184     /**
 185      * Build the tag information.
 186      *
 187      * @param constructorDocTree the content tree to which the documentation will be added
 188      */
 189     protected void buildTagInfo(Content constructorDocTree) {
 190         writer.addTags(currentConstructor, constructorDocTree);
 191     }
 192 }


  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.ExecutableElement;
  32 import javax.lang.model.element.TypeElement;
  33 
  34 import jdk.javadoc.internal.doclets.toolkit.BaseOptions;
  35 import jdk.javadoc.internal.doclets.toolkit.ConstructorWriter;
  36 import jdk.javadoc.internal.doclets.toolkit.Content;
  37 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  38 
  39 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
  40 
  41 /**
  42  * Builds documentation for a constructor.
  43  *
  44  *  <p><b>This is NOT part of any supported API.
  45  *  If you write code that depends on this, you do so at your own risk.
  46  *  This code and its internal interfaces are subject to change or
  47  *  deletion without notice.</b>
  48  */
  49 public class ConstructorBuilder extends AbstractMemberBuilder {
  50 
  51     /**
  52      * The current constructor that is being documented at this point in time.
  53      */
  54     private ExecutableElement currentConstructor;


 154     /**
 155      * Build the signature.
 156      *
 157      * @param constructorDocTree the content tree to which the documentation will be added
 158      */
 159     protected void buildSignature(Content constructorDocTree) {
 160         constructorDocTree.add(writer.getSignature(currentConstructor));
 161     }
 162 
 163     /**
 164      * Build the deprecation information.
 165      *
 166      * @param constructorDocTree the content tree to which the documentation will be added
 167      */
 168     protected void buildDeprecationInfo(Content constructorDocTree) {
 169         writer.addDeprecated(currentConstructor, constructorDocTree);
 170     }
 171 
 172     /**
 173      * Build the comments for the constructor.  Do nothing if
 174      * {@link BaseOptions#noComment} is set to true.
 175      *
 176      * @param constructorDocTree the content tree to which the documentation will be added
 177      */
 178     protected void buildConstructorComments(Content constructorDocTree) {
 179         if (!options.noComment) {
 180             writer.addComments(currentConstructor, constructorDocTree);
 181         }
 182     }
 183 
 184     /**
 185      * Build the tag information.
 186      *
 187      * @param constructorDocTree the content tree to which the documentation will be added
 188      */
 189     protected void buildTagInfo(Content constructorDocTree) {
 190         writer.addTags(currentConstructor, constructorDocTree);
 191     }
 192 }
< prev index next >