cls.appendChild(function);
function.setAttribute("name", method.name());
function.setAttribute("description", method.commentText());
function.setAttribute("type", method.returnType().typeName());
Parameter[] params = method.parameters();
for (int k = 0; k < params.length; k++) {
Parameter param = params[k];
Element parameter = document.createElement("parameter");
parameter.setAttribute("name", param.name());
parameter.setAttribute("type", param.typeName());