public static boolean processClass(ClassDoc classdoc, PrintStream out) { HashMap options = parseKeyValuePairsFrom(classdoc.tags("@ejb.bean")[0].text());
public static boolean processClass(ClassDoc classdoc, HashMap options, PrintStream out) {
    public static boolean processClass(ClassDoc classdoc, PrintStream out) {      HashMap options = parseKeyValuePairsFrom(classdoc.tags("@ejb.bean")[0].text());            out.print("<interface\n");      for (Iterator i= options.entrySet().iterator(); i.hasNext(); ) {        Map.Entry e = (Map.Entry) i.next();                out.print(" " + e.getKey() + "=\"" + e.getValue() + "\"\n");      }      out.println(">");      // Go through all the methods      MethodDoc[] methods = classdoc.methods();      for (int i= 0; i < methods.length; i++) {        Tag[] tags = methods[i].tags("@ejb.interface-method");        if (0 == tags.length) continue;        // Create method details:        out.println("  <method name=\""+ methods[i].name() + "\">");        out.println("    <comment><![CDATA[" + methods[i].commentText() + "]]></comment>");        out.println("    <return type=\"" + methods[i].returnType().qualifiedTypeName() + "\"/>");        // Add parameters        Parameter[] parameters = methods[i].parameters();        if (0 == parameters.length) {          out.println("    <parameters/>");        } else {          out.println("    <parameters>");          for (int j= 0; j < parameters.length; j++) {            out.println(              "      <parameter name=\"" +               parameters[j].name() +               "\" type=\"" + parameters[j].typeName() + "\"" +              " />"            );          }          out.println("    </parameters>");        }                // Add throws        ClassDoc[] thrownExceptions = methods[i].thrownExceptions();        if (0 == thrownExceptions.length) {          out.println("    <throws/>");        } else {          out.println("    <throws>");          for (int j= 0; j < thrownExceptions.length; j++) {            out.println(              "      <exception name=\"" +               thrownExceptions[j].qualifiedName() +               "\"/>"            );          }          out.println("    </throws>");        }        out.println("  </method>");      }      out.println("</interface>");      return true;    }