io.virtdata.processors.DocForFuncCtor Maven / Gradle / Ivy
The newest version!
package io.virtdata.processors;
import io.virtdata.annotations.Example;
import io.virtdata.annotations.ExampleData;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
public class DocForFuncCtor implements DocCtorData {
private Map args = new LinkedHashMap<>();
private String ctorDoc;
private String className;
private List> examples = new ArrayList<>();
public DocForFuncCtor(String className, String ctorDoc, Map args, List> examples) {
this.className = className;
this.ctorDoc = ctorDoc;
this.args.putAll(args);
ExampleData.validateExamples(examples);
this.examples.addAll(examples);
}
@Override
public String getClassName() {
return this.className;
}
@Override
public String getCtorJavaDoc() {
return ctorDoc;
}
@Override
public String toString() {
return "Ctor{" +
"class=" + className +
", args=" + args +
", ctorDoc='" + ctorDoc + '\'' +
'}';
}
@Override
public Map getArgs() {
return args;
}
@Override
public List> getExamples() {
return examples;
}
}