paint-brush
A Guide to Monkey-Patching in Javaby@nfrankel
279 reads

A Guide to Monkey-Patching in Java

by Nicolas FränkelSeptember 21st, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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.
featured image - A Guide to Monkey-Patching in Java
Nicolas Fränkel HackerNoon profile picture
Nicolas Fränkel

Nicolas Fränkel

@nfrankel

L O A D I N G
. . . comments & more!

About Author

Nicolas Fränkel HackerNoon profile picture
Nicolas Fränkel@nfrankel

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite