result.append(";");
}
+ /**
+ * Write method.
+ *
+ * @param jcfaClass
+ * @param jcfaMethod
+ * @param result
+ */
public static void writeToBuffer(final JcfaClass jcfaClass,
final JcfaMethod jcfaMethod, final StringBuffer result) {
if (jcfaMethod.getName().equals("<init>")) {
result.append("public " + jcfaClass.getLocalName() + "() {");
} else {
- result.append("public void " + jcfaMethod.getName() + "() {");
+ result.append("public " + jcfaMethod.getType() + " "
+ + jcfaMethod.getName() + "() {");
}
result.append("}");
}
+ /**
+ * Write comment.
+ *
+ * @param jcfaComment
+ * @param result
+ */
public static void writeToBuffer(final JcfaComment jcfaComment,
final StringBuffer result) {
if (jcfaComment.isJavaDoc()) {
result.append("\n/* ");
}
+ if (jcfaComment.getCommentList().size() > 1) {
+ result.append("\n");
+ }
+
for (String comment : jcfaComment.getCommentList()) {
- result.append(" " + comment + " ");
+ if (jcfaComment.getCommentList().size() > 1) {
+ result.append(" * " + comment + "\n");
+ } else {
+ result.append(comment);
+ }
}
result.append(" */\n");