The article discusses various approaches to implementing monkey-patching in Java. It begins with an explanation of monkey-patching and introduces the Decorator Design Pattern as a method to achieve similar functionality. The article then explores Java Proxy as a generic decorator and demonstrates its use. Instrumentation in Java is explained as a means to transform bytecode before loading it through a Java agent. Aspect-Oriented Programming (AOP) with AspectJ is also covered as a way to apply aspects across different object hierarchies.
People Mentioned
Nicolas Fränkel
@nfrankel
Developer Advocate for Apache APISIX *** Learner *** Author of http://leanpub.com/integrationtest
Share Your Thoughts