Add @defer syntax to generate callbacks from instance methods