String (@NotNull Context context, @NotNull String optionalCall) { boolean hasImplicitType = context.myEnv.generateValue(Generator.booleans(), null); String declaration = (hasImplicitType ? "var" : type) + " result = " + optionalCall + ";"; boolean isFinalVar = context.myEnv.generateValue(Generator.booleans(), null); if (!isFinalVar) return declaration; context.afterStep = "Runnable r = () -> System.out.println(result);"; return "final " + declaration; }