\r
for (Type type : method.getArgumentTypes()) {\r
jcfaMethod.getComment().getCommentList().add(type.toString());\r
+ jcfaMethod.getArugumentTypeList().add(type.toString());\r
}\r
- jcfaMethod.setType(method.getReturnType().getSignature());\r
+ jcfaMethod.setType(method.getReturnType().toString());\r
\r
final Code code = method.getCode();\r
if (code == null) {\r
writeToBuffer(jcfaMethod.getComment(), result);
if (jcfaMethod.getName().equals("<init>")) {
- result.append("public " + jcfaClass.getLocalName() + "() {");
+ result.append("public " + jcfaClass.getLocalName() + "(");
} else {
result.append("public " + jcfaMethod.getType() + " "
- + jcfaMethod.getName() + "() {");
+ + jcfaMethod.getName() + "(");
}
+ int argNo = 0;
+ for (String argumentType : jcfaMethod.getArugumentTypeList()) {
+ if (argNo != 0) {
+ result.append(", ");
+ }
+ result.append(argumentType);
+ result.append(" arg" + argNo);
+ }
+
+ result.append(")");
+
+ result.append("{");
result.append("}");
}
package jp.igapyon.jcfa.vo;
+import java.util.ArrayList;
+import java.util.List;
+
public class JcfaMethod extends JcfaNode {
protected String name;
protected String type;
+ protected final List<String> arugumentTypeList = new ArrayList<String>();;
+
protected String access;
public String getAccess() {
return access;
}
+ public List<String> getArugumentTypeList() {
+ return arugumentTypeList;
+ }
+
public String getName() {
return name;
}
/**
* Method. java.lang.String[]
*/
- public V main() {
+ public void main(java.lang.String[] arg0) {
}
}
\ No newline at end of file