A Guide to Monkey-Patching in Javaby@nfrankel

A Guide to Monkey-Patching in Java

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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.

People Mentioned

Mention Thumbnail
featured image - A Guide to Monkey-Patching in Java
Nicolas Fränkel HackerNoon profile picture

@nfrankel

Nicolas Fränkel

Developer Advocate for Apache APISIX *** Learner *** Author of http://leanpub.com/integrationtest


Receive Stories from @nfrankel


Credibility

react to story with heart
Nicolas Fränkel HackerNoon profile picture
by Nicolas Fränkel @nfrankel.Developer Advocate for Apache APISIX *** Learner *** Author of http://leanpub.com/integrationtest
Read all my posts!

RELATED STORIES

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