package net.ssehub.kernel_haven.code_model.ast;

import net.ssehub.kernel_haven.util.logic.Formula;
import net.ssehub.kernel_haven.util.null_checks.NonNull;

public class Function extends SyntaxElementWithChildreen {

    private @NonNull SyntaxElement header;
    
    public Function(@NonNull Formula presenceCondition, @NonNull SyntaxElement header) {
        super(presenceCondition);
        this.header = header;
    }
    
    public @NonNull SyntaxElement getHeader() {
        return header;
    }

    @Override
    protected @NonNull String elementToString(@NonNull String indentation) {
        return "Function\n" + header.toString(indentation + "\t");
    }

    @Override
    public void accept(@NonNull ISyntaxElementVisitor visitor) {
        visitor.visitFunction(this);
    }

}

@@ -211,16 +211,55 @@
 reen %7B%0A%0A
+    private @NonNull String name;%0A    %0A
     priv
@@ -353,16 +353,38 @@
 ndition,
+ @NonNull String name,
  @NonNul
@@ -469,24 +469,50 @@
 r = header;%0A
+        this.name = name;%0A
     %7D%0A    %0A 
@@ -582,24 +582,95 @@
 eader;%0A    %7D
+%0A    %0A    public @NonNull String getName() %7B%0A        return name;%0A    %7D
 %0A%0A    @Overr
@@ -774,16 +774,29 @@
 Function
+ %22 + name + %22
 %5Cn%22 + he

Add name attribute to function