sb.append("<!-- Default options loaded by BoneCP. Modify as per your needs. This file has\n");
sb.append(" been automatically generated. -->\n");
sb.append("<bonecp-config>\n");
sb.append("\t<default-config>\n");
JavaDocBuilder builder = new JavaDocBuilder();
// find the file (cater for maven/eclipse workflows)
File f = new File("bonecp/src/main/java/com/jolbox/bonecp/BoneCPConfig.java");
File out;
FileReader fr;
if (f.canRead()){
fr = new FileReader(f);
out = new File("bonecp/src/main/resources/bonecp-default-config.xml");
} else {
fr = new FileReader("src/main/java/com/jolbox/bonecp/BoneCPConfig.java");
out = new File("src/main/resources/bonecp-default-config.xml");
}
builder.addSource(fr);
JavaClass cls = builder
.getClassByName("com.jolbox.bonecp.BoneCPConfig");
for (JavaMethod method : cls.getMethods()) {
String mName = method.getName();
if (mName.startsWith("set") && method.isPublic()) {
Annotation[] a = method.getAnnotations();