package com.rollbar.payload.data.body;

public class CodeContext {
    private final String[] pre;
    private final String[] post;

    public CodeContext() {
        this(null, null);
    }

    public CodeContext(String[] pre, String[] post) {
        this.pre = pre == null ? null : pre.clone();
        this.post = post == null ? null : post.clone();
    }

    public String[] pre() {
        return pre == null ? null : pre.clone();
    }

    public CodeContext pre(String[] pre) {
        return new CodeContext(pre, post);
    }

    public String[] post() {
        return post == null ? null : post.clone();
    }

    public CodeContext post(String[] post) {
        return new CodeContext(pre, post);
    }
}

@@ -33,16 +33,132 @@
 .body;%0A%0A
+/**%0A * Represents the context around the code where the error occurred (lines before, 'pre', and after, 'post')%0A */%0A
 public c
@@ -242,16 +242,51 @@
  post;%0A%0A
+    /**%0A     * Constructor%0A     */%0A
     publ
@@ -345,437 +345,1249 @@
     
-public CodeContext(String%5B%5D pre, String%5B%5D post) %7B%0A        this.pre = pre == null ? null : pre.clone();%0A        this.post = post == null ? null : post.clone();%0A    %7D%0A%0A    public String%5B%5D pre() %7B%0A        return pre == null ? null : pre.clone();%0A    %7D%0A%0A    public CodeContext pre(String%5B%5D pre) %7B%0A        return new CodeContext(pre, post);%0A    %7D%0A%0A    public String%5B%5D post() %7B%0A        return post == null ? null : post.clone();%0A    %7D%0A
+/**%0A     * Constructor%0A     * @param pre the lines of code before the one that triggered the error%0A     * @param post the lines of code after the one that triggered the error%0A     */%0A    public CodeContext(String%5B%5D pre, String%5B%5D post) %7B%0A        this.pre = pre == null ? null : pre.clone();%0A        this.post = post == null ? null : post.clone();%0A    %7D%0A%0A    /**%0A     * @return the lines of code before the one that triggered the error%0A     */%0A    public String%5B%5D pre() %7B%0A        return pre == null ? null : pre.clone();%0A    %7D%0A%0A    /**%0A     * Set the lines of code before the one that triggered the error in a copy of this CodeContext%0A     * @param pre the new %60pre%60 lines of code%0A     * @return a copy of this CodeContext with pre overridden%0A     */%0A    public CodeContext pre(String%5B%5D pre) %7B%0A        return new CodeContext(pre, post);%0A    %7D%0A%0A    /**%0A     * @return the lines of code after the one that triggered the error%0A     */%0A    public String%5B%5D post() %7B%0A        return post == null ? null : post.clone();%0A    %7D%0A%0A    /**%0A     * Set the lines of code after the one that triggered the error in a copy of this CodeContext%0A     * @param post the new %60post%60 lines of code%0A     * @return a copy of this CodeContext with post overridden%0A     */
 %0A   

Add javadocs for CodeContext