Writer wr = new FileWriter(erlangFile);wr.write("-module(testFile).\n-behaviour(gen_server).\n");
wr.write("handle_call(F,_,_) when F == [] -> {reply,wr(F),5}.\n");
wr.write("wr([]) -> 1.");
wr.write(otherMethods);wr.close();
ErlangModule mod = ErlangModule.loadModule(ErlangModule.setupErlangConfiguration(new File(erlangFile)));
final Configuration config = Configuration.getDefaultConfiguration().copy();config.setErlangModuleName(mod.getName());config.setLabelKind(LABELKIND.LABEL_ERLANG);
mod.sigs.put("strA", new FuncSignature(defaultConfig, ErlangLabel.parseText(
"{\"testFile.erl\",3,handle_call,1,{'Func',[],[{'String',[],[[],\"strA\"]}],{'Int',[values],[1]}}}"),
null));
mod.sigs.put("strB", new FuncSignature(defaultConfig, ErlangLabel.parseText(
"{\"testFile.erl\",3,handle_call,1,{'Func',[],[{'String',[],[\"strB\"]}],{'Int',[values],[1]}}}"),