/** * Process the methods in the class. * * @param md An array of MethodDoc objects */ public void processMethods(ClassDoc cd, MethodDoc[] md) { if (trace) System.out.println("PROCESSING " + cd.name() + " METHODS, number = " + md.length); for (int i = 0; i < md.length; i++) { String methodName = md[i].name(); if (trace) System.out.println("PROCESSING METHOD: " + methodName); // Skip <init> and <clinit> if (methodName.startsWith("<")) continue; // Only save the shown elements if (!shownElement(md[i], memberVisibilityLevel)) continue; outputFile.print(" <method name=\"" + methodName + "\""); com.sun.javadoc.Type retType = md[i].returnType(); if (retType.qualifiedTypeName().compareTo("void") == 0) { // Don't add a return attribute if the return type is void outputFile.println(); } else { outputFile.print(" return=\""); emitType(retType); outputFile.println("\""); } outputFile.print(" abstract=\"" + md[i].isAbstract() + "\""); outputFile.print(" native=\"" + md[i].isNative() + "\""); outputFile.println(" synchronized=\"" + md[i].isSynchronized() + "\""); addCommonModifiers(md[i], 6); outputFile.println(">"); // Generate the parameter elements, if any Parameter[] params = md[i].parameters(); for (int j = 0; j < params.length; j++) { outputFile.print(" <param name=\"" + params[j].name() + "\""); outputFile.print(" type=\""); emitType(params[j].type()); outputFile.println("\"/>"); } // Generate the exception elements if any exceptions are thrown processExceptions(md[i].thrownExceptions()); addDocumentation(md[i], 6); outputFile.println(" </method>"); } // for } // processMethods()