AST transform for object methods