String (List<String> methodNames) { StringBuilder sb = new StringBuilder("package myPkg;\n\npublic class MyClass {\n"); methodNames.forEach(s -> sb.append(" public void ").append(s).append("() {}\n")); sb.append("}"); return sb.toString(); }