package nl.talsmasoftware.umldoclet.model;

import nl.talsmasoftware.umldoclet.rendering.indent.IndentingPrintWriter;

import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import java.util.Set;

import static java.util.Objects.requireNonNull;
import static nl.talsmasoftware.umldoclet.model.Field.umlAccessibility;

/**
 * @author Sjoerd Talsma
 */
public class Method extends Renderer {

    protected final ExecutableElement method;
    protected final Set<Modifier> modifiers;

    protected Method(Type type, ExecutableElement executableElement) {
        super(type.diagram);
        this.method = requireNonNull(executableElement, "Method executable element is <null>.");
        this.modifiers = executableElement.getModifiers();
    }

    @Override
    protected IndentingPrintWriter writeTo(IndentingPrintWriter output) {
        return output.append(umlAccessibility(modifiers)).append(method.getSimpleName()).append("()").newline();
    }

}

@@ -276,16 +276,67 @@
 onNull;%0A
+import static java.util.stream.Collectors.joining;%0A
 import s
@@ -928,15 +928,8 @@
     
-return 
 outp
@@ -1001,21 +1001,265 @@
 e())
-.append(%22()%22)
+;%0A        output.append(method.getParameters().stream()%0A                .map(elem -%3E Field.umlTypeOf(diagram.env.getTypeUtils().asElement(elem.asType())) + %22 %22 + elem.getSimpleName())%0A                .collect(joining(%22, %22, %22(%22, %22)%22)));%0A        return output
 .new

Add (extensive) method parameters.