}
private void writeEnumValueOfMethod(JEnumType type, JField mapField) {
// return Enum.valueOf(map, name);
JFieldRef mapRef = new JFieldRef(program, null, null, mapField, type);
JVariableRef nameRef = createVariableRef(null,
currentMethod.params.get(0));
JMethod delegateTo = program.getIndexedMethod("Enum.valueOf");
JMethodCall call = new JMethodCall(program, null, null, delegateTo);
call.getArgs().add(mapRef);
call.getArgs().add(nameRef);