static S makeResponder_callAnswerMethod(O bot, S s, L history) { S answer = (S) callOpt(bot, "answer", s, history); if (answer == null) answer = (S) callOpt(bot, "answer", s); return answer; } static Responder makeResponder(final O bot) { if (bot instanceof Responder) ret (Responder) bot; if (bot instanceof S) { S f = cast bot; ret new Responder { public S answer(S s, L history) { S answer = (S) callOptMC((S) bot, s, history); if (answer == null) answer = (S) callOptMC((S) bot, s); return answer; } }; } ret new Responder { public S answer(S s, L history) { return makeResponder_callAnswerMethod(bot, s, history); } }; }