|
|
|
@ -46,7 +46,7 @@ public class JavaClassReader {
|
|
|
|
|
s = s.replaceAll(";", "");
|
|
|
|
|
String[] split = s.split("\\.");
|
|
|
|
|
|
|
|
|
|
if ("req".equals(split[split.length - 1]) || "rsp".equals(split[split.length - 1])|| "ent".equals(split[split.length - 1])) {
|
|
|
|
|
if ("req".equals(split[split.length - 1]) || "rsp".equals(split[split.length - 1]) || "ent".equals(split[split.length - 1])) {
|
|
|
|
|
moduleName = split[split.length - 2];
|
|
|
|
|
for (int i = 0; i < split.length - 2; i++) {
|
|
|
|
|
domainName += split[i] + ".";
|
|
|
|
@ -58,8 +58,8 @@ public class JavaClassReader {
|
|
|
|
|
}
|
|
|
|
|
if (line.startsWith("import")) {
|
|
|
|
|
if (!line.contains("frame")) {
|
|
|
|
|
if (line.contains(".ent.")){
|
|
|
|
|
line = line.replaceAll("\\.ent\\.",".entity.");
|
|
|
|
|
if (line.contains(".ent.")) {
|
|
|
|
|
line = line.replaceAll("\\.ent\\.", ".entity.");
|
|
|
|
|
}
|
|
|
|
|
importList.add(line);
|
|
|
|
|
}
|
|
|
|
@ -87,21 +87,21 @@ public class JavaClassReader {
|
|
|
|
|
if ("extends".equals(split[i])) {
|
|
|
|
|
fatherName = split[i + 1];
|
|
|
|
|
|
|
|
|
|
if (fatherName.contains("FindResponse") || fatherName.contains("GetAllResponse")){
|
|
|
|
|
if (fatherName.contains("FindResponse") || fatherName.contains("GetAllResponse")) {
|
|
|
|
|
hasList = true;
|
|
|
|
|
|
|
|
|
|
Pattern pattern = Pattern.compile("<(.*?)>");
|
|
|
|
|
Matcher matcher = pattern.matcher(fatherName);
|
|
|
|
|
if (matcher.find()){
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String group = matcher.group(1);
|
|
|
|
|
Tclass = group;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (fatherName.contains("FindRequest")){
|
|
|
|
|
if (fatherName.contains("FindRequest")) {
|
|
|
|
|
findOrSearchflag = "1";
|
|
|
|
|
}else if( fatherName.contains("SearchRequest")){
|
|
|
|
|
} else if (fatherName.contains("SearchRequest")) {
|
|
|
|
|
findOrSearchflag = "2";
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
findOrSearchflag = "0";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -116,7 +116,7 @@ public class JavaClassReader {
|
|
|
|
|
if (body.get(i).contains("{")) {
|
|
|
|
|
body.set(i, body.get(i).replaceAll("\\{", ""));
|
|
|
|
|
String s = body.get(i);
|
|
|
|
|
if (s.length() <= 1){
|
|
|
|
|
if (s.length() <= 1) {
|
|
|
|
|
body.remove(i);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -128,11 +128,11 @@ public class JavaClassReader {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ("".equals(body.get(0))){
|
|
|
|
|
if (body.size() > 1 && "".equals(body.get(0))) {
|
|
|
|
|
body.remove(0);
|
|
|
|
|
}
|
|
|
|
|
if ("".equals(body.get(body.size()-1))){
|
|
|
|
|
body.remove(body.size()-1);
|
|
|
|
|
if (body.size() > 1 && "".equals(body.get(body.size() - 1))) {
|
|
|
|
|
body.remove(body.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bufferedReader.close();
|
|
|
|
|