In programming, the strangler fig pattern or strangler pattern is an architectural pattern that involves wrapping old code, with the intent of redirecting it to newer code or to log uses of the old code. Coined by Martin Fowler, its name derives from the strangler fig plant, which tends to grow on trees and eventually kill them. It has also been called Ship of Theseus pattern, named after a philosophical paradox.
The pattern can be used at the method level or the class level.