Add support for replacing methods in the direct copy class transformer