001/* 002 * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. 003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 004 * 005 * This code is free software; you can redistribute it and/or modify it 006 * under the terms of the GNU General Public License version 2 only, as 007 * published by the Free Software Foundation. Oracle designates this 008 * particular file as subject to the "Classpath" exception as provided 009 * by Oracle in the LICENSE file that accompanied this code. 010 * 011 * This code is distributed in the hope that it will be useful, but WITHOUT 012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 014 * version 2 for more details (a copy is included in the LICENSE file that 015 * accompanied this code). 016 * 017 * You should have received a copy of the GNU General Public License version 018 * 2 along with this work; if not, write to the Free Software Foundation, 019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 020 * 021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 022 * or visit www.oracle.com if you need additional information or have any 023 * questions. 024 */ 025 026package org.jdrupes.mdoclet.internal.doclets.toolkit; 027 028import javax.lang.model.element.ExecutableElement; 029 030/** 031 * The interface for writing constructor output. 032 */ 033public interface ConstructorWriter extends MemberWriter { 034 035 /** 036 * {@return the constructor details header} 037 * 038 * @param content the content representing member details 039 */ 040 Content getConstructorDetailsHeader(Content content); 041 042 /** 043 * {@return the constructor documentation header} 044 * 045 * @param constructor the constructor being documented 046 */ 047 Content getConstructorHeaderContent(ExecutableElement constructor); 048 049 /** 050 * {@return the signature for the given constructor} 051 * 052 * @param constructor the constructor being documented 053 */ 054 Content getSignature(ExecutableElement constructor); 055 056 /** 057 * Add the deprecated output for the given constructor. 058 * 059 * @param constructor the constructor being documented 060 * @param constructorContent the content to which the deprecated information will be added 061 */ 062 void addDeprecated(ExecutableElement constructor, 063 Content constructorContent); 064 065 /** 066 * Add the preview output for the given member. 067 * 068 * @param member the member being documented 069 * @param content the content to which the preview information will be added 070 */ 071 void addPreview(ExecutableElement member, Content content); 072 073 /** 074 * Add the comments for the given constructor. 075 * 076 * @param constructor the constructor being documented 077 * @param constructorContent the content to which the comments will be added 078 */ 079 void addComments(ExecutableElement constructor, Content constructorContent); 080 081 /** 082 * Add the tags for the given constructor. 083 * 084 * @param constructor the constructor being documented 085 * @param constructorContent the content to which the tags will be added 086 */ 087 void addTags(ExecutableElement constructor, Content constructorContent); 088 089 /** 090 * {@return the constructor details} 091 * 092 * @param memberDetailsHeader the content representing member details header 093 * @param memberDetails the content representing member details 094 */ 095 Content getConstructorDetails(Content memberDetailsHeader, 096 Content memberDetails); 097 098 /** 099 * Let the writer know whether a non public constructor was found. 100 * 101 * @param foundNonPubConstructor true if we found a non public constructor. 102 */ 103 void setFoundNonPubConstructor(boolean foundNonPubConstructor); 104 105 /** 106 * @return the member header} 107 */ 108 Content getMemberHeader(); 109}