1 package org.catacomb.act; 2 3 4 public class DefaultConstructor { 5 6 String body; 7 8 public DefaultConstructor() { 9 10 } 11 12 public DefaultConstructor(String bdy) { 13 body = bdy; 14 } 15 16 public String toJavaSource(String cnm) { 17 StringBuffer sb = new StringBuffer(); 18 sb.append(" public " + cnm + "() {\n"); 19 if (body != null) { 20 sb.append(" " + body + ";\n"); 21 } 22 sb.append(" }\n"); 23 return sb.toString(); 24 } 25 26 27 }