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; 029import javax.lang.model.type.TypeMirror; 030 031/** 032 * The interface for writing method output. 033 */ 034public interface MethodWriter extends MemberWriter { 035 036 /** 037 * Get the method details header. 038 * 039 * @param content the content representing member details 040 * @return the method details header 041 */ 042 Content getMethodDetailsHeader(Content content); 043 044 /** 045 * Get the method documentation header. 046 * 047 * @param method the method being documented 048 * @return the method documentation header 049 */ 050 Content getMethodHeader(ExecutableElement method); 051 052 /** 053 * Get the signature for the given method. 054 * 055 * @param method the method being documented 056 * @return the method signature 057 */ 058 Content getSignature(ExecutableElement method); 059 060 /** 061 * Add the deprecated output for the given method. 062 * 063 * @param method the method being documented 064 * @param methodContent the content to which the deprecated information will be added 065 */ 066 void addDeprecated(ExecutableElement method, Content methodContent); 067 068 /** 069 * Adds the preview output for the given member. 070 * 071 * @param member the member being documented 072 * @param content the content to which the preview information will be added 073 */ 074 void addPreview(ExecutableElement member, Content content); 075 076 /** 077 * Add the comments for the given method. 078 * 079 * @param holder the holder type (not erasure) of the method 080 * @param method the method being documented 081 * @param methodContent the content to which the comments will be added 082 */ 083 void addComments(TypeMirror holder, ExecutableElement method, 084 Content methodContent); 085 086 /** 087 * Add the tags for the given method. 088 * 089 * @param method the method being documented 090 * @param methodContent the content to which the tags will be added 091 */ 092 void addTags(ExecutableElement method, Content methodContent); 093 094 /** 095 * Get the method details. 096 * 097 * @param methodDetailsHeader the content representing method details header 098 * @param methodDetails the content representing method details 099 * @return the method details 100 */ 101 Content getMethodDetails(Content methodDetailsHeader, 102 Content methodDetails); 103 104 /** 105 * Gets the member header. 106 * 107 * @return the member header 108 */ 109 Content getMemberHeader(); 110}