io.virtdata.processors.ExampleDocData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
package io.virtdata.processors;
import io.virtdata.annotations.Category;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
public class ExampleDocData implements DocFuncData {
@Override
public String getPackageName() {
return "packagename";
}
@Override
public Category[] getCategories() {
return new Category[] { Category.general };
}
@Override
public String getClassName() {
return "classname";
}
@Override
public String getClassJavadoc() {
return "javadoc";
}
@Override
public String getInType() {
return "intype";
}
@Override
public String getOutType() {
return "outtype";
}
@Override
public List getCtors() {
ArrayList ctors = new ArrayList<>();
// for each ctor
LinkedHashMap args = new LinkedHashMap<>();
args.put("arg1", "val1");
List> examples = new ArrayList<>();
examples.add(new ArrayList() {{ add("example"); add("one"); }});
DocForFuncCtor ctordoc = new DocForFuncCtor("name", "ctordoc", args, examples);
ctors.add(ctordoc);
return ctors;
}
public List getCtorsAlternate() {
return new ArrayList() {{
add(new DocForFuncCtor("name", "ctordoc",
new LinkedHashMap() {{
put("aname", "atype");
}},
new ArrayList>() {{
add(new ArrayList() {{
add("example");
add("description");
}});
}}
));
add(new DocForFuncCtor("name", "ctordoc",
new LinkedHashMap() {{
put("aname", "atype");
}},
new ArrayList>() {{
add(new ArrayList() {{
add("example");
}});
}}
));
}};
}
}