* @throws InstantiationException
*/
public static String getUsageAsHtml() throws IllegalAccessException, InstantiationException {
StringBuilder usage = new StringBuilder(1024);
for (Entry<String, Class<? extends RequestHandler>> handler : handlers.entrySet()) {
RequestHandler sample = handler.getValue().newInstance();
String[] mandatory = sample.getMandatoryParams();
String[] optional = sample.getOptionalParams();
String[] examples = sample.getUsageExamples(handler.getKey().substring(1));
usage.append("<li>");
usage.append(handler.getKey());
if (sample.getUsage() != null && !sample.getUsage().isEmpty()) {
usage.append(" — <i>").append(sample.getUsage()).append("</i>");
}
if (mandatory != null) {
usage.append("<br/>mandatory parameters: ").append(Utils.join(", ", Arrays.asList(mandatory)));
}
if (optional != null) {