Map nameToType, JimpleBody body, Unit insertPoint) {
Local local;
try {
PtParser parser = new PtParser();
ASTPtRootNode parseTree = parser.generateParseTree(expression);
ActorCodeGenerationScope scope = new ActorCodeGenerationScope(
entity, entityClass, nameToFieldOrLocal, nameToType, body,
insertPoint);
ParseTreeCodeGenerator generator = new ParseTreeCodeGenerator();
local = generator.generateCode(parseTree, body, insertPoint, scope);