package com.github.therapi.runtimejavadoc;

import java.util.List;

public abstract class BaseJavadoc {

    private final String name;
    private final Comment comment;
    private final List<SeeAlsoJavadoc> seeAlso;
    private final List<OtherJavadoc> other;

    BaseJavadoc(String name, Comment comment, List<SeeAlsoJavadoc> seeAlso, List<OtherJavadoc> other) {
        this.name = name;
        this.comment = comment;
        this.other = other;
        this.seeAlso = seeAlso;
    }

    public String getName() {
        return name;
    }

    public Comment getComment() {
        return comment;
    }

    public List<SeeAlsoJavadoc> getSeeAlso() {
        return seeAlso;
    }

    public List<OtherJavadoc> getOther() {
        return other;
    }
}

@@ -61,16 +61,122 @@
 .List;%0A%0A
+import static com.github.therapi.runtimejavadoc.internal.RuntimeJavadocHelper.unmodifiableDefensiveCopy;%0A%0A
 public a
@@ -546,21 +546,48 @@
 other = 
+unmodifiableDefensiveCopy(
 other
+)
 ;%0A      
@@ -603,23 +603,50 @@
 eAlso = 
+unmodifiableDefensiveCopy(
 seeAlso
+)
 ;%0A    %7D%0A

Make defensive copies of the "see also" and "other" lists