protected String generateJavadoc(int index) throws Exception {
    String		result;
    OptionHandler	handler;
    String		optionStr;
    
    result = "";
    
    if (index == 0) {
      if (!canInstantiateClass())
	return result;
	    
      if (!ClassDiscovery.hasInterface(OptionHandler.class, getInstance().getClass()))
	throw new Exception("Class '" + getClassname() + "' is not an OptionHandler!");
      
      // any options at all?
      handler = (OptionHandler) getInstance();
      Enumeration enm = handler.listOptions();
      if (!enm.hasMoreElements())
	return result;
      
      // prolog?
      if (getProlog())
	result = "Valid options are: <p/>\n\n";
      
      // options
      enm = handler.listOptions();
      while (enm.hasMoreElements()) {
	Option option = (Option) enm.nextElement();
	optionStr =   toHTML(option.synopsis()) 
                    + "\n" 
                    + toHTML(option.description().replaceAll("\\t", " "));
	result += "<pre> " + optionStr.replaceAll("<br/>", "") + "</pre>\n\n";
      }
      
      // stars?
      if (getUseStars()) 
	result = indent(result, 1, "* ");
    }
    
    return result;
  }