1.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java Tue Nov 30 09:38:48 2010 -0800 1.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java Wed Dec 01 11:02:38 2010 -0800 1.3 @@ -36,68 +36,81 @@ 1.4 * Do not use it as an API 1.5 * 1.6 * @author Jamie Ho 1.7 + * @author Bhavesh Patel (Modified) 1.8 * @since 1.5 1.9 */ 1.10 1.11 public interface MethodWriter { 1.12 1.13 /** 1.14 - * Write the header for the method documentation. 1.15 + * Get the method details tree header. 1.16 * 1.17 - * @param classDoc the class that the methods belong to. 1.18 - * @param header the header to write. 1.19 + * @param classDoc the class being documented 1.20 + * @param memberDetailsTree the content tree representing member details 1.21 + * @return content tree for the method details header 1.22 */ 1.23 - public void writeHeader(ClassDoc classDoc, String header); 1.24 + public Content getMethodDetailsTreeHeader(ClassDoc classDoc, 1.25 + Content memberDetailsTree); 1.26 1.27 /** 1.28 - * Write the method header for the given method. 1.29 + * Get the method documentation tree header. 1.30 * 1.31 - * @param method the method being documented. 1.32 - * @param isFirst the flag to indicate whether or not the method is the 1.33 - * first to be documented. 1.34 + * @param method the method being documented 1.35 + * @param methodDetailsTree the content tree representing method details 1.36 + * @return content tree for the method documentation header 1.37 */ 1.38 - public void writeMethodHeader(MethodDoc method, boolean isFirst); 1.39 + public Content getMethodDocTreeHeader(MethodDoc method, 1.40 + Content methodDetailsTree); 1.41 1.42 /** 1.43 - * Write the signature for the given method. 1.44 + * Get the signature for the given method. 1.45 * 1.46 - * @param method the method being documented. 1.47 + * @param method the method being documented 1.48 + * @return content tree for the method signature 1.49 */ 1.50 - public void writeSignature(MethodDoc method); 1.51 + public Content getSignature(MethodDoc method); 1.52 1.53 /** 1.54 - * Write the deprecated output for the given method. 1.55 + * Add the deprecated output for the given method. 1.56 * 1.57 - * @param method the method being documented. 1.58 + * @param method the method being documented 1.59 + * @param methodDocTree content tree to which the deprecated information will be added 1.60 */ 1.61 - public void writeDeprecated(MethodDoc method); 1.62 + public void addDeprecated(MethodDoc method, Content methodDocTree); 1.63 1.64 /** 1.65 - * Write the comments for the given method. 1.66 + * Add the comments for the given method. 1.67 * 1.68 - * @param holder the holder type (not erasure) of the method. 1.69 - * @param method the method being documented. 1.70 + * @param holder the holder type (not erasure) of the method 1.71 + * @param method the method being documented 1.72 + * @param methodDocTree the content tree to which the comments will be added 1.73 */ 1.74 - public void writeComments(Type holder, MethodDoc method); 1.75 + public void addComments(Type holder, MethodDoc method, Content methodDocTree); 1.76 1.77 /** 1.78 - * Write the tag output for the given method. 1.79 + * Add the tags for the given method. 1.80 * 1.81 - * @param method the method being documented. 1.82 + * @param method the method being documented 1.83 + * @param methodDocTree the content tree to which the tags will be added 1.84 */ 1.85 - public void writeTags(MethodDoc method); 1.86 + public void addTags(MethodDoc method, Content methodDocTree); 1.87 1.88 /** 1.89 - * Write the method footer. 1.90 + * Get the method details tree. 1.91 + * 1.92 + * @param methodDetailsTree the content tree representing method details 1.93 + * @return content tree for the method details 1.94 */ 1.95 - public void writeMethodFooter(); 1.96 + public Content getMethodDetails(Content methodDetailsTree); 1.97 1.98 /** 1.99 - * Write the footer for the method documentation. 1.100 + * Get the method documentation. 1.101 * 1.102 - * @param classDoc the class that the methods belong to. 1.103 + * @param methodDocTree the content tree representing method documentation 1.104 + * @param isLastContent true if the content to be added is the last content 1.105 + * @return content tree for the method documentation 1.106 */ 1.107 - public void writeFooter(ClassDoc classDoc); 1.108 + public Content getMethodDoc(Content methodDocTree, boolean isLastContent); 1.109 1.110 /** 1.111 * Close the writer.